---
title: "Activate or pause an automation"
method: POST
path: "/automations/{id}"
tags: ["Automations"]
---

# Activate or pause an automation

`POST /automations/{id}`

## Request

- Base URL: `https://api.supersendtx.com`
- URL: `https://api.supersendtx.com/automations/{id}`
- Auth: HTTP bearer

Activating requires a workspace that has hired Ranla (a paid Ranla plan); otherwise it
returns 402. Pausing works on any plan, so a flow can always be stopped. Drafts can be
created, edited, and deleted on any plan.

## Path parameters

- `id` string, required

## Request body

- AutomationActionRequest
  - `action` 'activate' | 'pause', required

## Response `200`

Updated automation status

- AutomationResponse
  - `automation` Automation, required
    - `id` string, required
    - `name` string, required
    - `status` 'draft' | 'active' | 'paused', required
    - `trigger` AutomationTrigger, required
      - `type` 'event', required
      - `event` string, required
      - `cancel_on_events` string[]: When any listed event fires for the same recipient, cancel queued/running/waiting runs for this automation.
      - `once_per_contact` boolean: `true` to enroll each person at most once, ever (matched on the event's `email` or `user_id`). A later matching event is skipped and reported in the `POST /events` response under `enrollment_skips` with `reason: once_per_contact`. Returned only when enabled. Retrying a run is not blocked by it.
      - `cooldown_days` integer: Skip enrollment when the same person already had a run on this automation within the last N days (`reason: cooldown` in `enrollment_skips`). Returned only when set. Retrying a run is not blocked by it.
    - `steps` AutomationStep[], required
      - `type` 'delay' | 'send_email' | 'send_sms' | 'condition' | 'wait_for_event', required
      - `email` AutomationStepEmail: The `email` object of a `send_email` step, sent through the same path as `POST /emails` (other `POST /emails` fields such as `reply_to`, `cc`, and `tags` pass through). Provide inline `subject` plus `html` and/or `text`, or a published `template` — not both. String values accept placeholders such as `{{event.email}}`, `{{contact.first_name}}`, and `{{unsubscribe_url}}`.
        - `from` string, required
        - `to` union, required
          - string
          - string[]
        - `subject` string
        - `html` string
        - `text` string
        - `template` SendTemplateRef: Reference a published template by UUID or alias. Mutually exclusive with html/text.
          - `id` string, required: Template UUID or alias
          - `variables` object: Values for `{{variable}}` placeholders (HTML-escaped in html body)
        - `category` 'transactional' | 'product' | 'newsletter': Inline steps default to `product`. `product` and `newsletter` sends honor that category's opt-outs, carry `List-Unsubscribe` headers, and replace `{{unsubscribe_url}}` in `html` and `text` with the managed unsubscribe link. The placeholder is replaced, never appended, so include it — create, update, and retrieve responses return a warning when a step has none. A recipient who opted out of the category is not mailed and the run ends as `completed`. Use `transactional` only for genuinely transactional mail such as receipts and one-time codes. Template-backed steps use the template's category unless this is set.
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `warnings` string[]: Advice about a definition that saved but should not ship as-is — for example a `product` or `newsletter` send_email step whose `html` or `text` has no `{{unsubscribe_url}}` link. Returned by create, update, and retrieve; omitted when there are none (and never returned by activate or pause).

## Other responses

- `400`: Invalid action
- `401`: Unauthorized
- `402`: `activate` on a workspace that has not hired Ranla. Checked before the automation is looked up. `pause` is never refused for this — stopping mail is always allowed.
- `404`: Not found

---

[API](https://skmtc.dev/ranla/apis/supersend-tx-api.md) · [All operations](https://skmtc.dev/ranla/apis/supersend-tx-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ranla/apis/supersend-tx-api/revisions/e3e782652f50?raw)
