---
title: "List an automation's runs"
method: GET
path: "/automations/{id}/runs"
tags: ["Automations"]
---

# List an automation's runs

`GET /automations/{id}/runs`

## Request

- Base URL: `https://api.parley.so/v1`
- URL: `https://api.parley.so/v1/automations/{id}/runs`
- Auth: HTTP bearer

List an automation's runs, newest first by default, with what started each one, how it ended, and why a failed run failed.

## Path parameters

- `id` string, required: The automation ID.

## Query parameters

- `status` 'pending' | 'running' | 'succeeded' | 'failed' | 'canceled' | 'timed_out': Only runs with this status.
- `sort` 'createdAt' | '-createdAt': Sort order: a field name, prefixed with - for descending. Defaults to -createdAt.
- `cursor` string: Opaque cursor from nextCursor. Pass the same filters and sort. Omit for the first page.
- `limit` integer: Maximum number of items to return.

## Response `200`

OK

- object
  - `data` AutomationRun[], required
    - `id` string, required: The run ID.
    - `automation` object, required: The automation that ran.
      - `type` 'automation', required
      - `id` string, required: Its ID.
      - `name` string, required: The automation name.
    - `status` 'pending' | 'running' | 'succeeded' | 'failed' | 'canceled' | 'timed_out', required: pending: queued and not yet started. running: in progress. succeeded, failed, canceled, and timed_out are final.
    - `triggerType` 'cron' | 'manual' | 'event' | 'slack', required: What started the run: a trigger of this type, or manual for a run someone started themselves.
    - `event` union, required: What started the run: a Parley event and the record it happened to, or a Slack message. Null for a run that neither started.
      - object
        - `type` 'project.created' | 'account.created' | 'contact.created', required: What happens in Parley to start a run: someone creates a project, an account, or a contact. Records that email and calendar sync create don't count.
        - `record` RecordRef, required: A reference to a project, account, or contact.
          - `type` 'project' | 'account' | 'contact', required: The kind of record: project, account, or contact.
          - `id` string, required: Its ID.
          - `name` string, required: The record's name. A contact's is its first and last name, or an email address when it has no name.
      - object
        - `type` 'slack.message' | 'slack.reaction', required: slack.message: someone posted the message in the channel. slack.reaction: someone reacted to the message.
        - `channel` object, required: The Slack channel the message is in.
          - `id` string, required: The Slack channel ID.
          - `name` string, required: The channel name, without the #.
        - `reaction` string, nullable, required: The emoji someone reacted with, such as white_check_mark, or null for a posted message.
        - `permalink` string, nullable, required: A link to the message in Slack, or null.
    - `triggerId` string, nullable, required: The trigger ID.
    - `scheduledFor` string, date-time, nullable, required: The time a cron trigger set for the run, or null for a run that no cron trigger started.
    - `startedAt` string, date-time, nullable, required: When the run started.
    - `endedAt` string, date-time, nullable, required: When the run finished.
    - `error` object, nullable, required: Why the run didn't succeed, or null.
      - `code` string, required: Machine-readable reason, such as USAGE_LIMIT_REACHED.
      - `message` string, required: Human-readable description.
    - `sessionId` string, nullable, required: The session the run worked in, whose messages hold its report, or null once that session is deleted.
    - `createdAt` string, date-time, required: When the run was queued.
  - `nextCursor` string, nullable, required: Cursor for the next page, or null on the last page.

## Other responses

- `400`: The request was invalid. VALIDATION_FAILED, INVALID_CURSOR.
- `401`: Missing or invalid credentials. UNAUTHORIZED.
- `403`: You don't have permission. FORBIDDEN.
- `404`: Not found. NOT_FOUND.
- `429`: Too many requests, or a usage limit was reached. TOO_MANY_REQUESTS.

---

[API](https://skmtc.dev/parley/apis/parley-api.md) - [All operations](https://skmtc.dev/parley/apis/parley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/parley/apis/parley-api/revisions/6b78aeee07bc?raw)
