# GET /api/v2/automations

List automations

- MCP id: automations.index
- Scope: api:read:automations
- Scope: api:read:project_automations
- Scope: api:read:customer_automations
- Permission: automations::read
- Needs the automations feature on your organisation
- Rate cost: 1 unit, read bucket. `view=detail` makes it 3. Adds: each include +1, `q` +2.
- Cache-Control: private, no-store

Returns the automations the caller may see, by name A to Z: the organisation's own, those of every project or customer, and those of one project or customer the caller may see.

Which ones that is follows the scope's own permission, and a token narrowed to one scope, such as `api:read:project_automations`, lists only that scope's. Narrow to a scope with `context_type` and `context_id`. A deleted automation is listed only with `trashed=with` or `trashed=only`. Pass `view=detail` for what a person fills in to start one by hand. The flow itself is the current version: `GET /api/v2/automation-versions/{current_version_id}`. The declared permission is `automations::read`; for a project or customer automation, the `project_automations` or `customer_automations` permission of the same action applies instead.

## Parameters
- view (string, optional): Which field set to render.
- per_page (integer 1 to 100, optional): Rows per page. At most 25 when `include` names a to-many relation; a larger value is 400 invalid-query-parameter.
- cursor (string, optional): Opaque keyset cursor from a previous page's links.next. Never construct one by hand.
- page (integer 1 to 1000, optional): Opt in to page-number paging: 1-based, at most 1000. Omit it, the default, to page by opaque cursor, which is what links.next hands you. Cannot be combined with cursor. Published only on collections that count their rows on every request.
- filter[context_id] (integer, optional): The one project or customer they belong to. Pair with `context_type`; `filter[context_id][null]=true` with a type gives the automations of every project or customer. Operators: = in null.
- filter[context_type] (string, optional): What the automations belong to: `project` or `customer`. Pass `filter[context_type][null]=true` for the organisation's own automations. Operators: = in null.
- filter[created_at] (timestamp (YYYY-MM-DDThh:mm:ssZ), optional): Creation timestamp. Pair with `sort=id` for a stable full export. Operators: = gte lt.
- filter[current_version_id] (integer, optional): The version whose flow runs. `null` for automations without a flow yet. Operators: = in null.
- filter[is_active] (boolean, optional): Whether they are switched on.
- filter[last_run_at] (timestamp (YYYY-MM-DDThh:mm:ssZ), optional): When they last started a run. Operators: = gte lte null.
- filter[next_run_at] (timestamp (YYYY-MM-DDThh:mm:ssZ), optional): When a schedule trigger next starts a run. Operators: = gte lte null.
- filter[owner_id] (integer, optional): The person who made them. Operators: = in null.
- filter[template_key] (string, optional): The template they were made from. `filter[template_key][null]=true` gives the ones built from scratch. Operators: = in null.
- filter[trigger_record_type] (string, optional): The record type their trigger starts on, such as `work_item`. Operators: = in.
- filter[trigger_type] (string, optional): The step type of their trigger, such as `trigger.schedule`. Operators: = in.
- filter[updated_at] (timestamp (YYYY-MM-DDThh:mm:ssZ), optional): Last-write timestamp. Use for incremental sync. Operators: = gte lt.
- filter[updated_by_id] (integer, optional): Who last saved them. Operators: = in null.
- q (string, optional): Free-text search over `name`. At most one substring match per request: `q` together with a `contains` filter is 400 invalid-query-parameter.
- sort (string, optional): Up to three keys, comma-separated, each optionally prefixed with `-` for descending.
- include (string, optional): Comma-separated names to inline, at most five.
- trashed (string, optional): Whether soft-deleted rows are included.
- X-Request-Id (header, optional): A correlation id of your own. It is recorded in our logs next to the server's request id but never returned: the response header always carries the server's id. A value that does not match the pattern is discarded silently, never rejected.
- If-None-Match (header, optional): The ETag a read is conditional on. A match is answered 304 with no body.

## Response 200
- id (integer, required): Unique identifier.
- name (string ≤ 255, required): Name as shown in the automations list.
- description (string or null, required, multiline): What the automation is for, in its makers' words.
- context_type (string or null, required): What the automation belongs to. `null` is the whole organisation. With a type, `context_id` names the one project or customer, or is `null` for every one of them. The scope decides which permissions apply: `automations`, `project_automations` or `customer_automations`.
- context_id (integer or null, required): The one project or customer the automation belongs to. `null` with a `context_type` means every project or every customer.
- owner_id (integer or null, required): The person who made the automation. Its runs use their permissions, so a step they may not do is refused when the flow is saved. `null` once that user is gone. It is whoever creates the automation and never changes, except for plnnrly support's own account, which must name a real person here when it creates or changes one.
- owner_requires_replacement (boolean, required): Whether the owner is plnnrly support's own account. Such an automation cannot be saved or switched on until a real person is named as its owner.
- is_active (boolean, required, server-assigned): Whether the automation is switched on. A new automation is always off.
- is_runnable (boolean, required): Whether triggers start runs right now: switched on, not paused and not deleted.
- paused_reason (string or null, required): Why plnnrly paused the automation, such as a step that kept failing. `null` while it is not paused. Switching it on again clears it. Never names record data.
- current_version_id (integer or null, required): The version whose flow runs. `null` until a flow is first saved.
- trigger_type (string or null ≤ 255, required, server-assigned): The step type of the flow's trigger, such as `trigger.record_created`, taken from the current version. See `GET /api/v2/automation-node-types`.
- trigger_record_type (string or null ≤ 255, required, server-assigned): The record type the trigger starts on, such as `work_item`, or `null` for a trigger without a record, such as a schedule.
- trigger_events (array of string, required): The record events the trigger starts on. Empty for a trigger that does not start on record events, such as a schedule or a date being reached.
- next_run_at (timestamp (YYYY-MM-DDThh:mm:ssZ) or null, required): When a schedule trigger next starts a run. `null` for other triggers.
- last_run_at (timestamp (YYYY-MM-DDThh:mm:ssZ) or null, required): When the automation last started a run.
- runs_count (integer, required): How many live runs the automation has started, as counted for the organisation's usage. Test runs and runs that were skipped are not counted.
- template_key (string or null ≤ 100, required): The template the automation was made from, `null` when it was built from scratch. See `GET /api/v2/automation-templates`. Send it on create to start from that template: its flow is saved as version 1, with the answers in `template_answers` in their places.
- manual_inputs (array of object, required, detail only): What a person fills in when they start the automation by hand, as its trigger declares it. Empty for an automation that is not started by hand.
- webhook_url (string or null, required): The address other systems send requests to, for an automation whose trigger receives webhooks; `null` otherwise. Requests must also prove they know the automation's secret, which this API never returns.
- updated_by_id (integer or null, required): Who last saved the automation's flow or settings.
- created_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Creation timestamp.
- updated_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Last-write timestamp; use for incremental sync.
- deleted_at (timestamp (YYYY-MM-DDThh:mm:ssZ) or null, required): Soft-delete timestamp, `null` while live. A deleted automation starts no runs.
- owner (Ref or UserSummary or null, required): The person who made the automation.
- updated_by (Ref or UserSummary or null, required): Who last saved the automation.
- current_version (Ref or AutomationVersionSummary or null, required): The version whose flow runs.
- versions_count (integer ≥ 0, required): Number of saved versions of the flow.
- links (AutomationLinks, required)
  - self (url, required): The canonical URI of this record.
  - versions (url, required): Every saved version of the flow, newest first.
  - runs (url, required): The automation's runs, newest first.

## Errors
- 403 forbidden-by-policy | insufficient-permission | insufficient-token-scope: Forbidden.
- 304 : Not modified.
- 400 idempotency-key-required | invalid-cursor | invalid-query-parameter | malformed-request | unsupported-parameter: Bad request.
- 401 token-expired | unauthenticated: Unauthenticated.
- 404 endpoint-not-found | resource-not-found: Not found.
- 406 not-acceptable: Not acceptable.
- 429 rate-limit-exceeded: Too many requests.
- 500 internal-error: Server error.
- 503 tenant-unavailable: Service unavailable.

## Example
```bash
curl -G \
  'https://<your-url>/api/v2/automations' \
  --data-urlencode 'filter[context_type]=project' \
  --data-urlencode 'filter[is_active]=true' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json'
```
