Edit an automation

Editing an active automation publishes a new version at once and must leave it valid; runs in progress finish on the version they started with.

PATCH/v1/automations/{id}

Path Parameters

  • idstringrequired

Body Parameters

  • namestring

    At most 80 characters.

  • fromstring

    One of your numbers. A sandbox number makes it a sandbox flow. Nullable.

  • topic_idstring

    Skip recipients unsubscribed from this topic. Nullable.

  • triggerobject
  • trigger.eventstring

    Example: trial_started.

  • trigger.filtersarray of object

    At most 5 items.

  • trigger.filters[].propertystring
  • trigger.filters[].opstring
  • trigger.filters[].valueany
  • stepsarray of AutomationStep

    At most 20 items.

Details

Pause first to save work in progress.

Responses

  • 200Automation

    Updated automation

  • 401Error

    Missing, malformed, or revoked API key

  • 402Error

    Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged

  • 429Error

    Rate limit or quota exceeded

Response Fields

  • idstring

    Example: auto_a1B2c3D4e5F6.

  • objectautomation
  • namestring
  • statusdraft, active, paused
  • triggerobject
  • stepsarray of AutomationStep
  • fromstring

    Nullable.

  • topic_idstring

    Nullable.

  • testboolean

    Sandbox or live, decided by the sender number. Nullable.

  • versioninteger

    Published version; runs are pinned to the one they started on.

  • unpublished_changesboolean
  • statsobject
  • stats.runs_startedinteger
  • stats.runs_activeinteger
  • stats.runs_completedinteger
  • stats.runs_failedinteger
  • stats.runs_opted_outinteger
  • stats.triggers_skippedinteger

    Triggers ignored because that person already had a run in progress.

  • stats.messages_sentinteger
  • stats.last_triggered_atstring (date-time)

    Nullable.

  • issuesarray of object

    What stops this flow from running. Empty when it can be activated.

  • issues[].wherestring

    A step id, "trigger" or "flow".

  • issues[].fieldstring
  • issues[].messagestring
  • created_atstring (date-time)
  • updated_atstring (date-time)

Errors

Every error has the same JSON shape, and request_id matches the X-Request-Id response header. Errors lists every code and what to do about it.

  • 401

    Missing, malformed, or revoked API key

  • 402

    Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged

  • 429

    Rate limit or quota exceeded