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

# Automations API

> Read your automations and how their runs went.

The Automations API reads your [automations](https://docs.decimal.app/automations/overview.md): what starts each one, what it's told to do, the tools it can use, and every run. It's read-only. Create and edit automations in **Settings → Automations**.

| Endpoint | Scope |
| - | - |
| [List automations](https://docs.decimal.app/api-reference/automations/list-automations.md) | `automations:read` |
| [Get an automation](https://docs.decimal.app/api-reference/automations/get-an-automation.md) | `automations:read` |
| [List an automation's runs](https://docs.decimal.app/api-reference/automations/list-an-automations-runs.md) | `automations:read` |

## Automations

| Field | Meaning |
| - | - |
| `id` | The automation's ID, also the last part of its URL in Settings |
| `name`, `instructions` | Its name and what it's told to do |
| `enabled` | Whether its trigger starts runs |
| `trigger` | What starts a run: a ticket event, an SLA, a Slack message, a schedule, or `manual`, with any delay or filter. See [Triggers](https://docs.decimal.app/automations/triggers.md) |
| `tools` | The tools it can use. Ticket actions read `<action>:<source>`, like `tagTicket:pylon` |
| `effort` | Its [effort level](https://docs.decimal.app/automations/effort.md) |
| `version` | Goes up by one each time it's edited |
| `next_run_at` | For a switched-on schedule, the next run |

`GET /v0/automations` returns every automation at once, without pagination.

## Runs

`GET /v0/automations/{id}/runs` returns runs newest first. Page with `limit` and `starting_after`.

```bash theme={null}
curl "https://api.getdecimal.ai/v0/automations/urgent-tickets-to-slack-3f9a1c/runs?limit=20" \
  -H "Authorization: Bearer sk-de-..."
```

| Field | Meaning |
| - | - |
| `status` | `pending`, `running`, `succeeded`, or `failed` |
| `error` | Why it failed, or `null` |
| `trigger_type` | The trigger that started it |
| `test` | Whether someone started it with **Test** in the editor |
| `ticket_id` | The ticket it acted on, or `null` |
| `created_at`, `started_at`, `finished_at` | When it was queued, started, and ended |

To see each step a run took, open it in [Run history](https://docs.decimal.app/automations/run-history.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.