---
title: "Fire an automation with a signed request"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fire an automation with a signed request

Path: CloudRaker Paperwork API › Automations

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

Fires an automation from your own stack (Zapier, GitHub Actions, an internal cron). The agent answers in a real thread your team can join, with the same approval gate as any other run — a proposed action still waits for a human.

Authentication is a per-automation HMAC, not an API key: send `x-rk1-trigger-signature: t=<unix-seconds>,v1=<hex hmac-sha256("<t>.<raw body>", secret)>`. The secret is shown once when the automation is created and can be rotated. Requests more than 5 minutes old are rejected. Body: `{}` or `{ "input": <json ≤ 8 KiB> }`, which is rendered into the message the agent receives.

A run already live in the automation’s thread answers `busy` (the slot is skipped, never duplicated); one parked on an approval answers `needs_input`.

An automation that has moved to the trigger surface keeps answering this URL, in this same envelope. Its fire is accepted and queued, so it answers `started` with `runId: null`; where `runId` is present it names the work session (`ws_…`) the fire opened, not a thread run.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `ref` (`triggerAutomation.path.ref`; string, required)

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.cloudraker.com/v1/automations/<ref>/trigger' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/v1/automations/<ref>/trigger';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/v1/automations/<ref>/trigger"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 200

The fire outcome.

#### Example

```json
{
  "data": {
    "automationRunId": "string",
    "threadId": "string",
    "runId": "string",
    "status": "started"
  }
}
```

- `data` (`triggerAutomation.response.200.data`; object, required)
  - `automationRunId` (`triggerAutomation.response.200.data.automationRunId`; string, required) — The fire record. Opaque and stable: a retry of the same signed request reports the same id.
  - `threadId` (`triggerAutomation.response.200.data.threadId`; string | null, required) — The thread the run posts in, when the fire opened one at once. `null` while the fire is queued.
  - `runId` (`triggerAutomation.response.200.data.runId`; string | null, required) — The run the fire started. For an automation that has moved to the trigger surface this is its work session (`ws_…`). It is `null` while the fire is still queued, which is what a `started` answer reports for such an automation.
  - `status` (`triggerAutomation.response.200.data.status`; string, required)
    - one of `"started"`, `"success"`, `"busy"`, `"needs_input"`, `"blocked"`, `"error"`

### 400

`invalid_request` — body over 8 KiB or not JSON.

### 401

`unauthorized` — missing, bad or replayed signature.

### 404

`not_found` — unknown reference, or the automation or its trigger is off.

### 429

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

#### Example

```json
{
  "code": "rate_limited",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`triggerAutomation.response.429.code`; string, required)
  - one of `"rate_limited"`
- `message` (`triggerAutomation.response.429.message`; string, required)
- `retryable` (`triggerAutomation.response.429.retryable`; boolean, required)
  - one of `true`
- `requestId` (`triggerAutomation.response.429.requestId`; string, required)
- `docUrl` (`triggerAutomation.response.429.docUrl`; string, optional)


Source: https://docs.cloudraker.com/paperwork/api/automations/trigger-automation/index.md
