---
title: "Trigger automation"
method: POST
path: "/v1/automations/{id}/trigger"
tags: ["Automations"]
---

# Trigger automation

`POST /v1/automations/{id}/trigger`

## Request

- Base URL: `https://api.replicas.dev`
- URL: `https://api.replicas.dev/v1/automations/{id}/trigger`
- Auth: HTTP bearer

Runs the automation now in a new workspace. For a `pull_request.command` trigger, pass `pr` to choose the pull request.

## Path parameters

- `id` string, uuid, required

## Headers

- `X-Replicas-Api-Version` '2026-10-07'

## Request body

- TriggerAutomationRequest: Request body for manually triggering an automation
  - `payload` object: Optional payload to pass to the automation execution
  - `pr` object: Pull request to run against. Requires a GitHub `pull_request.command` trigger for that repository.
    - `repository_id` string, uuid, required: The Replicas repository UUID the pull request belongs to
    - `number` integer, required: The pull request number

## Response `200`

Automation triggered successfully

- TriggerAutomationResponse: Response after triggering an automation
  - `execution_id` string, uuid, required: Unique identifier for the execution
  - `workspace_id` string, uuid, nullable, required: The workspace created for this execution

## Other responses

- `400`: Bad request - Missing or invalid parameters
- `401`: Unauthorized - Invalid or missing API key
- `404`: Resource not found
- `500`: Internal server error

---

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