---
title: "Run an automation now"
method: POST
path: "/automations/{id}/runs"
tags: ["Automations"]
---

# Run an automation now

`POST /automations/{id}/runs`

## Request

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

Start a run of an automation now, without waiting for a trigger. A paused automation can be run too. Returns the run as soon as it's queued; follow its progress by listing the automation's runs. Returns 429 USAGE_LIMIT_REACHED when the organization has reached its limit of automation runs for a given period; don't retry until older runs fall outside that window.

## Path parameters

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

## Response `201`

Created.

- AutomationRun
  - `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.

## 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, USAGE_LIMIT_REACHED.

---

[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)
