Skip to main content
Use this endpoint to update any combination of fields on an existing automation. The PATCH method performs a partial update — only the fields you include in the request body are changed, leaving all other fields untouched. This makes it safe to toggle an automation on or off, rename it, or adjust a single trigger condition without needing to resend the full automation config.
Updating trigger or action replaces those objects entirely. If you send a new trigger object with only some conditions, any conditions you omit will be permanently removed. Retrieve the current automation first using the List Automations endpoint if you want to merge your changes into the existing config rather than overwrite it.

Endpoint

PATCH https://api.stairoids.com/v1/automations/:id

Authentication

Authorization: Bearer <api-key>

Path Parameters

id
string
required
The unique identifier of the automation you want to update. You can find this in the id field returned by the List or Create endpoints (e.g., auto_a1b2c3d4).

Request Body

All fields are optional. Include only the fields you want to change.
name
string
A new human-readable name for the automation.
enabled
boolean
Set to true to activate the automation or false to pause it. This is the fastest way to toggle an automation without modifying its logic.
trigger
object
A replacement trigger configuration. This fully replaces the existing trigger object. For incoming automations, include method and optionally integration. For outgoing automations, include event and optionally conditions.
action
object
A replacement action configuration. This fully replaces the existing action object. Include type and a complete config object for the destination integration.

Common Use Cases

Toggle an automation on or off without touching its logic. This is the most common update operation.
cURL
curl -X PATCH https://api.stairoids.com/v1/automations/auto_a1b2c3d4 \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": true }'
To pause the automation, send "enabled": false instead.

Response

A successful request returns HTTP 200 OK with the full updated automation object.
{
  "id": "auto_a1b2c3d4",
  "name": "High-Intent Form Submits → HubSpot (v2)",
  "type": "outgoing",
  "enabled": true,
  "trigger": {
    "event": "signal.created",
    "conditions": [
      {
        "field": "signal.type",
        "operator": "eq",
        "value": "form_submit"
      },
      {
        "field": "signal.score",
        "operator": "gt",
        "value": "75"
      }
    ]
  },
  "action": {
    "type": "hubspot",
    "config": {
      "object": "deal",
      "pipeline_id": "pipeline_001",
      "stage_id": "stage_qualified",
      "owner_id": "hs_owner_88",
      "field_mappings": {
        "dealname": "{{account.name}} — {{signal.type}}",
        "hs_lead_status": "IN_PROGRESS"
      }
    }
  },
  "created_at": "2024-10-15T11:00:00Z",
  "updated_at": "2024-10-16T09:15:00Z"
}

HTTP Status Codes

StatusMeaning
200 OKUpdate applied successfully. The response body contains the full updated automation.
400 Bad RequestA field value is invalid (e.g., unrecognised operator in a condition).
401 UnauthorizedThe API key is missing or invalid.
404 Not FoundNo automation with the given id exists in your workspace.
422 Unprocessable EntityThe update would leave the automation in an invalid state (e.g., an outgoing automation with an empty trigger).
429 Too Many RequestsRate limit exceeded. Check the Retry-After header.