Automations
Comment-to-DM automations on the connected Instagram account or Facebook Page (platform): a keyword in a comment on a post (or in a DM, or in an Instagram story reply) gets a DM back, once per person, with an optional public reply under the comment. On Facebook the DM lands in Messenger. Create one for an OmniSocials post (post_id), for a post published outside OmniSocials (instagram_media_id or facebook_post_id), for the next post the workspace publishes, or for every post. Opt-in scopes automations:read and automations:write. A post can also carry its automations at create time (comment_dm_automation on POST /posts/create, with platforms for Instagram, Facebook or both).
List automations
Returns the comment-to-DM automations of the workspace, newest first. An automation answers a keyword in a comment (or a DM, or an Instagram story reply) with a DM, once per person. It runs on the connected Instagram account, the connected Facebook Page or the connected X account (platform; on X it answers DMs only). Needs the opt-in automations:read scope.
query Parameters
statuspost_idOnly the automations bound to this OmniSocials post (one per platform at most).
platformOnly the automations of this platform.
List automations › Responses
List of automations
Create an automation
Creates a comment-to-DM automation on the connected Instagram account (default) or on the connected Facebook Page (platform: facebook). When somebody comments a keyword on the post (or sends it in a DM, or in an Instagram story reply, see trigger.kinds), the account sends them actions.dm.text as a private message, once per person, and optionally posts one of actions.public_reply.variations under the comment. On Facebook the DM lands in Messenger. Meta's rules are the same on both: one private reply per comment, within 7 days of the comment; a follow-up is only possible after the person answers (24-hour window). OmniSocials caps sends at 180 DMs an hour per account and platform; an answer over the cap waits in a queue for up to an hour. On X (platform: x) only trigger.kinds: ["dm"] exists: the account answers a DM with the keyword (or any first message with match: any), once per person, after X DMs are turned on for the workspace in the dashboard; X allows 15 answers per 15 minutes per account, and each answer ends with "Reply STOP to stop automatic messages.". For scope post, pass one of post_id (an OmniSocials post that goes to the platform; a scheduled post starts listening once it is live), instagram_media_id (an Instagram post published outside OmniSocials) or facebook_post_id (a Page post published outside OmniSocials). Needs the opt-in automations:write scope and a connected Instagram account, Facebook Page or X account; an active X automation also needs X DMs on (else 409 x_dms_off; status: paused always saves). Follow first (actions.follow_gate, Instagram only): the person first gets a short message with one button, and the link in dm.text goes out once a tap shows they follow the account; somebody who does not follow yet is asked to follow and tap again. Texts hold 640 characters and buttons 20; leave them out for the defaults. Facebook and X have no follow status, so enabled: true there answers 400 follow_gate_instagram_only.
Create an automation › Request Body
On create dm is required. On PATCH each key merges into the stored actions, so { "follow_gate": { "enabled": true } } alone keeps the DM and the public reply.
nameA label for the automations list (max 120 characters).
platformThe channel the automation runs on. Default instagram. instagram_media_id implies instagram and facebook_post_id implies facebook; a body that names another platform answers 400 validation_error. On PATCH it cannot change: another platform answers 400 platform_immutable. x answers DMs to the connected X account: only the dm kind (X allows an automated DM only after the person DMed you), the workspace needs X DMs turned on in the dashboard (else 409 x_dms_off for an active automation; status: paused saves it), every answer ends with the line "Reply STOP to stop automatic messages.", and a person who replies STOP gets no automatic DM from the account again. X does not give apps the messages of an encrypted X Chat conversation, so those get no answer.
post_idFor scope post: an OmniSocials post (scheduled or live) that goes to the automation's platform. A post that does not go there answers 400 post_not_instagram or post_not_facebook. One automation per post and platform: a post that goes to Instagram and Facebook can have one of each.
instagram_media_idFor scope post on Instagram: the numeric id of a post or reel that was published outside OmniSocials (from the Instagram API, GET /me/media). The post is read from Instagram to check it belongs to the connected account.
facebook_post_idFor scope post on Facebook: the id of a post that was published on the connected Facebook Page outside OmniSocials. Pass {page-id}_{post-id} or the post id alone (the Page id is put in front). The post is read from Facebook with the Page token; a post of another Page answers 404 facebook_post_not_found. Implies platform: facebook. Pass one of post_id, instagram_media_id or facebook_post_id.
statuspaused creates the automation without turning it on. Default active.
Create an automation › Responses
Automation created
Update an automation
Partial update. status pauses (paused) or resumes (active) the automation. trigger, actions and limits are merged into the stored sections: keys you omit keep their value (new keywords keep the kinds, the scope and the match; a new dm.text keeps the public reply). public_reply.variations: [] or enabled: false turns the public reply off; limits.max_sends: null removes that limit. actions.follow_gate merges into the stored one too: { "enabled": false } switches Follow first off and keeps its texts, new texts keep the switch as it is, null switches it off, and a body without follow_gate leaves it untouched. Another post_id, instagram_media_id or facebook_post_id moves the automation to that post. The platform never changes: a body that names another platform (or instagram_media_id on a Facebook automation, facebook_post_id on an Instagram one) answers 400 platform_immutable. A completed automation starts again when its limits or trigger change.
path Parameters
idUpdate an automation › Request Body
nameA label for the automations list (max 120 characters).
platformThe channel the automation runs on. Default instagram. instagram_media_id implies instagram and facebook_post_id implies facebook; a body that names another platform answers 400 validation_error. On PATCH it cannot change: another platform answers 400 platform_immutable. x answers DMs to the connected X account: only the dm kind (X allows an automated DM only after the person DMed you), the workspace needs X DMs turned on in the dashboard (else 409 x_dms_off for an active automation; status: paused saves it), every answer ends with the line "Reply STOP to stop automatic messages.", and a person who replies STOP gets no automatic DM from the account again. X does not give apps the messages of an encrypted X Chat conversation, so those get no answer.
post_idFor scope post: an OmniSocials post (scheduled or live) that goes to the automation's platform. A post that does not go there answers 400 post_not_instagram or post_not_facebook. One automation per post and platform: a post that goes to Instagram and Facebook can have one of each.
instagram_media_idFor scope post on Instagram: the numeric id of a post or reel that was published outside OmniSocials (from the Instagram API, GET /me/media). The post is read from Instagram to check it belongs to the connected account.
facebook_post_idFor scope post on Facebook: the id of a post that was published on the connected Facebook Page outside OmniSocials. Pass {page-id}_{post-id} or the post id alone (the Page id is put in front). The post is read from Facebook with the Page token; a post of another Page answers 404 facebook_post_not_found. Implies platform: facebook. Pass one of post_id, instagram_media_id or facebook_post_id.
On create dm is required. On PATCH each key merges into the stored actions, so { "follow_gate": { "enabled": true } } alone keeps the DM and the public reply.
statuspaused creates the automation without turning it on. Default active.
Update an automation › Responses
Automation updated
List automation events
One row per comment or message the automation acted on, newest first: the DM that was sent, an answer that waits in the queue, a skip with its reason, or a failure with the platform's error. counts gives the total per outcome. On Facebook person.username is the person's name and kind is comment or dm; on X kind is always dm and opted_out rows mark people who replied STOP. With Follow first (Instagram), waiting rows are people who were asked to follow and have no link yet, and the rows the gate handled carry follow_gate (taps, whether Instagram confirmed the follow, and whether the follow came after the ask).
path Parameters
idquery Parameters
outcomequeued = waits for room under the channel's send cap (at most an hour); opted_out = the person wrote STOP (X); waiting = Follow first asked the person to follow, no link yet (Instagram).
limitoffsetList automation events › Responses
Activity
countsRows per outcome, e.g. { "sent": 12, "skipped": 3, "waiting": 4 } (waiting = Follow first rows that wait for a follow).