Skip to content
Dashboard

Change an Instagram automation

PATCH
/instagram/automations/{id}
curl --request PATCH \
--url https://app.whatsetter.com/api/v1/instagram/automations/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "active": false }'

Changes the fields you send, the others stay. active: true switches it on (it then writes to real people; refused with 409 automation_conflict like on create), active: false switches it off. What the dashboard’s editor sets beyond these fields (rotated wordings, the e-mail ask, scripted steps, its follow-up, « Aussi sur Facebook ») is kept. Its account never changes. Requires scope instagram:write.

id
required
string

An automation (from listInstagramAutomations).

Media typeapplication/json

On create, name, trigger (on, and keywords or any_word: true) and dm_message are required. On change, only the fields sent change.

object
account_id

Create only: required when the workspace has several Instagram accounts.

string
name
string
<= 120 characters
active

True: it writes to real people from now on.

boolean
trigger
object
on

What fires it. Read back, ref_link is an automation made in the dashboard on an ig.me link.

string
Allowed values: comment story_reply story_mention dm
posts
One of:
string
Allowed values: all next
keywords

One of these words fires it (accents and case ignored).

Array<string>
<= 30 items
any_word

Every comment or message fires it

boolean
public_replies

Comments only: public replies under the comment, one picked each time. Empty = none.

Array<string>
<= 10 items
dm_message

The private message people receive (one per comment

string
<= 1000 characters
link

A link delivered as a card with a button once the person taps the button under the private message. null removes it.

object
url
required

A public https URL.

string format: uri
label

The button that opens the link.

string
<= 20 characters
ask_label

The button under the private message that asks for the link.

string
<= 20 characters
title

The card’s title.

string
<= 80 characters
follow_gate

Ask the person to follow the account before the link. null removes it.

object
message
required
string
<= 1000 characters
button_label
string
<= 20 characters
success_message
string
<= 1000 characters
campaign_id

The agent that continues (GET /campaigns, its id or campaign_id). Default: the account’s own.

string | null
ai_handoff

The agent takes the conversation over after the automation.

boolean
default: true
Example
{
"active": false
}

Changed

Media typeapplication/json
object
data
object
id
string
account_id
string
name
string
active
boolean
trigger
object
on

What fires it. Read back, ref_link is an automation made in the dashboard on an ig.me link.

string
Allowed values: comment story_reply story_mention dm
posts
One of:
string
Allowed values: all next
keywords

One of these words fires it (accents and case ignored).

Array<string>
<= 30 items
any_word

Every comment or message fires it

boolean
public_replies
Array<string>
dm_message
string
link
object
url
string
label
string | null
ask_label
string | null
title
string | null
follow_gate
object
message
string
button_label
string
success_message
string
campaign_id

The agent that continues (its campaign_id).

string | null
ai_handoff
boolean
stats
object
fired

Times it fired

integer
dms_sent

Private messages it sent.

integer
link_clicks

People who opened its link (once per person).

integer
last_fired_at
string | null format: date-time
created_at
string | null format: date-time
Example
{
"data": {
"trigger": {
"on": "comment",
"posts": "all"
}
}
}

Missing, unknown or revoked API key

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

The key lacks the required scope (insufficient_scope), the plan does not have this part of the API (not_in_plan), or Instagram is not enabled on the workspace (instagram_not_enabled, Instagram routes)

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Resource not found in this workspace

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

automation_conflict, see createInstagramAutomation.

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Invalid parameter or body (also an invalid or expired cursor)

Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}