Change an Instagram automation
const url = 'https://app.whatsetter.com/api/v1/instagram/automations/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"active":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”An automation (from listInstagramAutomations).
Request Bodyrequired
Section titled “Request Bodyrequired”On create, name, trigger (on, and keywords or any_word: true) and dm_message are required. On change, only the fields sent change.
object
Create only: required when the workspace has several Instagram accounts.
True: it writes to real people from now on.
object
What fires it. Read back, ref_link is an automation made in the dashboard on an ig.me link.
One of these words fires it (accents and case ignored).
Every comment or message fires it
Comments only: public replies under the comment, one picked each time. Empty = none.
The private message people receive (one per comment
A link delivered as a card with a button once the person taps the button under the private message. null removes it.
object
A public https URL.
The button that opens the link.
The button under the private message that asks for the link.
The card’s title.
Ask the person to follow the account before the link. null removes it.
object
The agent that continues (GET /campaigns, its id or campaign_id). Default: the account’s own.
The agent takes the conversation over after the automation.
Example
{ "active": false}Responses
Section titled “Responses”Changed
object
object
object
What fires it. Read back, ref_link is an automation made in the dashboard on an ig.me link.
One of these words fires it (accents and case ignored).
Every comment or message fires it
object
object
The agent that continues (its campaign_id).
object
Times it fired
Private messages it sent.
People who opened its link (once per person).
Example
{ "data": { "trigger": { "on": "comment", "posts": "all" } }}Missing, unknown or revoked API key
object
object
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)
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Resource not found in this workspace
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example" }}automation_conflict, see createInstagramAutomation.
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Invalid parameter or body (also an invalid or expired cursor)
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example" }}