Skip to main content
POST
Create a Replier automation

Authorizations

Authorization
string
header
required

A Replier API key (rpl_...).

Headers

Idempotency-Key
string

Send the same key when you retry, and the request runs once. Without one, every request runs.

Required string length: 1 - 128

Path Parameters

workspace_id
string<uuid>
required

Workspace ID returned by GET /v1/workspaces

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Body

application/json
name
string
required
Required string length: 1 - 80
move_targets
boolean

true takes each post that another automation has as its target off that automation in the same save, as the dashboard's Move does; that automation keeps its other targets and may be left with none. Only posts move; other conflicts still refuse. The result's moved_from names each one.

targets
object[]

Preferred target input for new calls

Required array length: 1 - 24 elements
channel
enum<string>
Available options:
instagram,
facebook
account_id
string
Minimum string length: 1
target_type
enum<string>

Target scope. all_future_posts covers new comments on every post of the account, earlier posts included; on a post with its own automation, only keyword ones take the comments it doesn't match; several automations can each take all_future_posts on one account with keywords that don't overlap (one any-comment at most). unchosen_post keeps the automation ready on the account without a post; it answers nothing, and any other comment target on the same account replaces it. story_mentions (Instagram) DMs whoever mentions the account in their story, once per person per 24 hours by default; it must be the automation's only target, ignores keywords, and one automation per account can have it. Omit only for compatibility: a non-null post_id means post and null means all_future_posts.

Available options:
post,
next_post,
all_future_posts,
story_replies,
story_mentions,
next_story,
story,
message,
unchosen_post
post_id
string | null
Minimum string length: 1
post_permalink
string<uri> | null
post_label
string | null
Maximum string length: 500
post_image_url
string<uri> | null
published_at
string<date-time> | null

Publication timestamp returned by GET /v1/workspaces/{workspace_id}/accounts/instagram/{account_id}/stories

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
keywords
string[]

A comment, story reply or message triggers the automation when its text contains any keyword, ignoring letter case and full-width versus half-width forms (+1 and +1 are the same keyword), including inside longer words. An empty list matches any of them. Before saving, add the other ways people are likely to type each keyword, as the Replier editor's keyword suggestions do: spacing and hyphen variants (bitplay, bit play, bit-play), common typos, the whole word in the other Chinese script (連結, 连结; never mixed). Only spellings of the same word: no synonyms or translations. Leave out a variant that contains a keyword (it already matches) or that also matches comments meaning something else (lik is inside like).

Minimum string length: 1
public_reply_enabled
boolean
default:true
public_replies
string[]

Saved public reply text. Sent only for post comments when public_reply_enabled is true. Leave out to use the public replies you saved in this workspace, or Replier's default.

Required array length: 1 - 5 elements
Required string length: 1 - 300
public_reply_selection
enum<string>

Defaults to the saved public replies' selection when public_replies is left out, otherwise random.

Available options:
random,
round_robin
dm_message
string

DM text sent to the commenter. Required unless flow is provided or a photo is sent with dm_image_display "photo" and no buttons; when flow is set, the entry ("dm") node's message is used. With a card photo it is the card title (1–80 characters). {{name}} becomes the recipient's name and {{username}} their Instagram username; each falls back to the other when Meta doesn't share it and counts as 30 characters toward the limit.

dm_image_id
string<uuid>

An existing uploaded photo ID from this workspace, sent as dm_image_display says.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
dm_image_display
enum<string>

How dm_image_id is sent. "card" (default): the photo is cropped per channel (Instagram 1:1, Facebook 1.91:1; upload the crops as POST /v1/workspaces/{workspace_id}/reply-images describes) with dm_message under it as a 1–80 character title and the buttons on the card. "photo": an ordinary DM image at its original ratio, never cropped (upload once without channel); dm_message is optional, up to 640 characters, and is sent after the photo carrying the buttons, so buttons need it. A comment's first DM is one message, so a photo with text as the first DM of an automation with post, next_post or all_future_posts targets needs gates.opening or gates.email (Follow Gate doesn't count), otherwise saving fails with PHOTO_NEEDS_OPEN_CONVERSATION.

Available options:
card,
photo
follow_gate_enabled
boolean
default:false

Verify Instagram recipients follow before sending the saved DM. Requires at least one Instagram target; Facebook targets send the saved DM without follow verification.

follow_gate_message
string

Leave out to use the Follow Gate text you saved in this workspace, or Replier's default.

Minimum string length: 1
follow_gate_button_text
string

Leave out to use the Follow Gate text you saved in this workspace, or Replier's default.

Required string length: 1 - 20
follow_gate_retry_message
string

Leave out to use the Follow Gate text you saved in this workspace, or Replier's default.

Minimum string length: 1
follow_gate_retry_button_text
string

Leave out to use the Follow Gate text you saved in this workspace, or Replier's default.

Required string length: 1 - 20
follow_gate_profile_button_enabled
boolean

Show a button that opens the Instagram account's profile above the follow confirmation button, in the follow prompt and its reminder. Off unless set.

follow_gate_profile_button_text
string

Write it in the follow prompt's language. Leave out to use the label you saved in this workspace; turning the button on needs one of the two.

Required string length: 1 - 20
buttons
object[]

Preferred button input for new calls: link buttons ({ title, url }) and reply buttons ({ title, type: "postback", message }).

Maximum array length: 3
Required string length: 1 - 20
enabled
boolean
default:true
gates
object

Opening and email gates. Runs go trigger, public reply, opening message, Follow Gate, email request, then the DM; a run waiting on a gate is gated. Omitted text keeps the gate's current text, then uses the default you saved in this workspace (GET /v1/workspaces/{workspace_id}/message-defaults); with neither, provide the text. On update, a gate left out stays as it is, and the update fails with AUTOMATION_VERSION_CONFLICT if the automation changed since it was read.

follow_up
object | null

Follow-up message, sent once inside the 24 hours the opening tap opens, so it needs gates.opening and is not available with flow. With link buttons: not_clicked goes wait_hours after the DM to whoever tapped no link button by then; clicked goes delay_minutes after the first link tap, when that tap came within wait_hours. Without link buttons only not_clicked is used, wait_hours after the DM, for everyone (links in dm_message are not tracked). Any message or tap from the person, or a newer DM to them, cancels a waiting follow-up. A send that would land in the window's last 5 minutes is skipped. Each message takes text, up to 3 link buttons (not click-tracked) and a photo, as dm_message, buttons and dm_image_id do; each branch keeps its content while off. null turns it off.

flow
object

Multi-step DM flow (Studio workspaces only). When provided, dm_message, dm_image_id, dm_image_display, buttons, and link_url are read from the "dm" entry node and MUST be omitted from the top-level input. Postback buttons advance to another node; web_url buttons open a link.

Response

OK

workspace
object
required
automation
object
required
moved_from
object[]

Each post move_targets took off another automation, and which one.