Automations
Update an automation
Rename an Instagram automation or replace its complete typed configuration, using expected_updated_at to prevent lost concurrent writes.
PATCH
Use this endpoint to change
name, configuration, or both. Your API key
needs automations:write, and the body must contain an accessible
account_id and expected_updated_at. You must send at least one of name
and configuration.
Status changes are not accepted here. Use
Activate an automation or
Deactivate an automation instead.
Send the complete configuration
configuration is a complete, typed automation configuration. It is not a
partial merge. When you include it, the validated object replaces the stored
configuration in full.
Read the automation first, modify the returned configuration locally, and
send the complete result. Omitting a section does not keep its previous stored
value, because all five sections are required:
The OpenAPI document is the source of truth for every
field, enum, bound, and nested action shape. Its
PublicAutomationUpdateV1
schema defines the complete request body and covers:
- Trigger selection through
type, and thepublication,story,keywords, andreactionsobjects that belong to it. - Opening delivery through
direct_message, itsdelay_seconds, messagetext, and up to three buttons of typestart_follow_uporurl. - Public replies through
public_reply, itsmessages,rotation,mention_mode, andmax_per_post. - Follow-up steps through
actions, includingsend_message,send_media,send_carousel,ask_to_follow,ask_for_email,ask_for_phone,add_contact_tag, andfinish. - Repeat protection through
extras.cooldown.
type, mode, match_mode, rotation, or mention_mode are
enums. Use only the values that document defines. The API rejects
unknown properties and invalid combinations with 422 and
api_automation_invalid_configuration. Read error.details.issues for the
failing path, code, and message.
Use List Instagram media to find the media id for a
trigger that watches one specific publication or story.
Automations created before the public contract
An automation whose stored configuration predates the public contract is returned withauthoring_compatibility set to read_only_legacy and
configuration set to null. You can still rename it. Sending a complete
configuration replaces the legacy configuration and converts the automation
to the public contract, which cannot be undone through the API.
Protect concurrent changes
Read the automation first, then send its exactupdated_at value as
expected_updated_at. If another request changed the automation, the API
returns 409 with api_automation_version_conflict. Read the automation again
and build a new update from the value it returns.
Example request
Example success response
Illustrative IDs, timestamps, and content. HTTP200.

