---
title: "Get an automation"
method: GET
path: "/automations/{id}"
tags: ["Automations"]
---

# Get an automation

`GET /automations/{id}`

## Request

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

Get one of your automations by ID, with its triggers and instructions.

## Path parameters

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

## Response `200`

OK

- Automation
  - `id` string, required: The automation ID.
  - `name` string, required: The automation name.
  - `description` string, nullable, required: A short summary of what the automation does, or null.
  - `status` 'active' | 'paused', required: active: the automation runs when its triggers fire. paused: its triggers are on hold, and the automation only runs when someone starts a run.
  - `nextRunAt` string, date-time, nullable, required: When a trigger next starts a run, or null for an automation that is paused or has no scheduled trigger.
  - `project` ProjectRef, required: The project's type, ID, and name.
    - `type` 'project', required
    - `id` string, required: Its ID.
    - `name` string, required: The project name.
  - `lastRun` object, nullable, required: The most recent run, or null for an automation that has never run.
    - `id` string, required: The run ID.
    - `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.
    - `startedAt` string, date-time, nullable, required: When the run started.
    - `endedAt` string, date-time, nullable, required: When the run finished.
  - `createdAt` string, date-time, required: When the automation was created.
  - `updatedAt` string, date-time, required: When the automation or its triggers were last changed.
  - `triggers` AutomationTrigger[], required: What starts the automation on its own, oldest first. Empty for an automation that only runs when someone starts a run.
    - union: Something that starts a run. cron: a schedule. event: something that happens in Parley. slack_message: a new top-level post in a Slack channel. slack_reaction: a reaction to a message in a Slack channel. More types will be added, so skip any type you do not recognize.
      - CronTrigger
        - `id` string, required: The trigger ID.
        - `type` 'cron', required
        - `cron` string, required: A five-field cron expression (minute, hour, day of month, month, day of week), such as 0 9 * * 1-5 for 9:00 AM on weekdays or 30 16 * * 5 for 4:30 PM on Fridays.
        - `timezone` string, required: The IANA time zone the cron expression is read in, such as America/New_York.
      - EventTrigger
        - `id` string, required: The trigger ID.
        - `type` 'event', required
        - `event` '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.
      - SlackMessageTrigger
        - `id` string, required: The trigger ID.
        - `type` 'slack_message', required
        - `channelId` string, required: The ID of the Slack channel the trigger watches.
        - `mentions` object[], required: Only posts that mention one of these people or user groups start a run. Empty for every new post.
          - `type` 'user' | 'user_group', required
          - `id` string, required: The Slack user or user group ID.
      - SlackReactionTrigger
        - `id` string, required: The trigger ID.
        - `type` 'slack_reaction', required
        - `channelId` string, required: The ID of the Slack channel the trigger watches.
        - `reaction` string, required: The emoji, such as white_check_mark, that starts a run when someone in the Slack workspace reacts with it.
  - `instructions` string, required: The automation's instructions: the prompt Parley's assistant carries out on every run.

## Other responses

- `400`: The request was invalid. VALIDATION_FAILED.
- `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)
