Skip to main content
PUT
/
automations
/
:id
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{
  "name": "Spring promo (updated)",
  "active": true,
  "actions": [
    {
      "type": "send_dm",
      "message": "Hey {{recipient_username}}! New link: https://example.com/spring"
    }
  ]
}' \
-X PUT https://api.ayrshare.com/api/automations/auto_9xKp2Lm4nQ
{
  "status": "success",
  "id": "auto_9xKp2Lm4nQ"
}

Documentation Index

Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Beta. See the Automations Overview for the full feature description.
Partial update. Only the listed fields are editable; sending anything else (e.g. platform, accountId) is rejected as a validation error. Sending triggers or actions replaces the existing children atomically: the old set is deleted and the new set is written in a single Firestore transaction. To change only one trigger, send the full new array. Re-activating a previously-inactive automation (active: true) re-checks the active-cap. If the cap is already at the limit, the update fails with code 470 and no changes are made.

Header Parameters

Path Parameters

id
string
required
The automation ID returned from POST /automations.

Body Parameters

name
string
New name.
description
string
New description.
active
boolean
Toggle the automation on or off. Setting this from false to true re-checks the active automation cap.
triggers
array
Full replacement set of triggers (1–50). Same shape as the create endpoint.
actions
array
Full replacement set of actions (1–50). Same shape as the create endpoint.
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{
  "name": "Spring promo (updated)",
  "active": true,
  "actions": [
    {
      "type": "send_dm",
      "message": "Hey {{recipient_username}}! New link: https://example.com/spring"
    }
  ]
}' \
-X PUT https://api.ayrshare.com/api/automations/auto_9xKp2Lm4nQ
{
  "status": "success",
  "id": "auto_9xKp2Lm4nQ"
}