Automations

Automations let you react to events (inbound/outbound messages, status changes, etc.) and trigger actions like status updates, webhooks, or autopilot messaging. Each automation is stored per organization and can be enabled per user.

GET/api/automations

List automations

Returns automations for the caller's organization, each augmented with enabled based on the current user's preferences.

Request

GET
/api/automations
curl https://your-tether-instance.com/api/automations \
  -H "Authorization: Bearer {token}"

POST/api/automations

Create an automation

Create a new automation for the organization. The creator's preference is set from the enabled flag (defaults to true).

Required attributes

  • Name
    name
    Type
    string
    Description
  • Name
    description
    Type
    string
    Description
  • Name
    event
    Type
    string
    Description

Optional attributes

  • Name
    triggerType
    Type
    string
    Description

    inbound, outbound, or all (default: outbound).

  • Name
    actions
    Type
    object
    Description

    Action payload (see above).

  • Name
    sourceStatuses
    Type
    array
    Description

    Filter automation to specific statuses.

  • Name
    maxTransitions
    Type
    number
    Description

    Limit number of times a record can transition.

  • Name
    conditions
    Type
    array
    Description

    Conditional rules with source, field, operator, value, logicalOperator.

  • Name
    enabled
    Type
    boolean
    Description

    Sets the creator's enabled flag.

Request

POST
/api/automations
curl -X POST https://your-tether-instance.com/api/automations \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Move hot leads",
    "description": "Move inbound hot leads to working and fire webhook",
    "event": "message.received",
    "triggerType": "inbound",
    "actions": {
      "changeToStatus": "working",
      "sendToWebhook": true,
      "webhookUrl": "https://hooks.example.com/leads",
      "webhookMethod": "POST",
      "webhookPayload": { "source": "sms" }
    },
    "conditions": [
      { "source": "conversation", "field": "channelType", "operator": "equals", "value": "sms" }
    ],
    "enabled": true
  }'

PUT/api/automations/:id

Update an automation

Modify an automation's definition. Any org user can edit automations in the org.

Request

PUT
/api/automations/:id
curl -X PUT https://your-tether-instance.com/api/automations/66110f9c68d5160f12345678 \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{ "description": "Updated copy", "actions": { "isAutopilot": true } }'

PATCH/api/automations/:id/preference

Enable or disable for yourself

Toggle a specific automation on or off for the current user without changing the organization-wide definition.

Body fields

  • Name
    enabled
    Type
    boolean
    Description

    Set to true to enable or false to disable for the caller.

Request

PATCH
/api/automations/:id/preference
curl -X PATCH https://your-tether-instance.com/api/automations/66110f9c68d5160f12345678/preference \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": false }'

DELETE/api/automations/:id

Delete an automation

Remove an automation and clean up user preference mappings.

Request

DELETE
/api/automations/:id
curl -X DELETE https://your-tether-instance.com/api/automations/66110f9c68d5160f12345678 \
  -H "Authorization: Bearer {token}"

Was this page helpful?