> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trystratos.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Automations

> Recurring posting schedules — one automation per TikTok account.

One automation drives exactly one TikTok account per firing. Posting to multiple accounts means multiple automations — matching how the product's own predictable-credit-spend model works.

## Create an automation

<ParamField body="appId" type="string" required />

<ParamField body="tiktokAccountId" type="string" required />

Requires `automations:write`.

```bash theme={null}
curl -X POST https://www.try-orbit.com/api/v1/automations \
  -H "Authorization: Bearer $STRATOS_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "appId": "product_a1b2c3",
    "format": "slideshow",
    "postingTimes": [{"time": "09:00", "days": ["mon","wed","fri"]}],
    "tiktokAccountId": "...",
    "brief": {"topic": "app growth tips"},
    "approvalMode": "manual"
  }'
```

## List / get / update / delete

* `GET /v1/automations` — `automations:read`
* `GET /v1/automations/{id}` — `automations:read`
* `PATCH /v1/automations/{id}` — `automations:write`. Body: `{ "status": "active" | "paused", "postingTimes"?, "brief"? }`
* `DELETE /v1/automations/{id}` — `automations:write`

<Note>
  Automations created via this API are stored in a `v1_automations` table separate from the app's own `automations` table — the scheduler that actually fires them needs a follow-up integration pass to read both. Check `GET /v1/automations/{id}` for status; if firings aren't happening yet in your deployment, this is why.
</Note>
