# POST /automations/:id/trigger

**Resource:** [Automations](./automations.md)  
**Scopes:** `automations:trigger`  
**Write operation:** yes

Manually trigger an automation with optional test data. Returns a normalized run response with inline action_results[].

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `id` | path | uuid | yes | Automation ID |
| `trigger_data` | body | object | no | Test data to pass to the automation |

## Request example

```bash
curl -X POST \
  "https://api.trustpager.com/functions/v1/api/v1/automations/auto-uuid/trigger" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "trigger_data": { "deal_id": "deal-uuid", "contact_id": "contact-uuid" } }'
```

## Response example

```json
{
  "data": {
    "run_id": "run-uuid-...",
    "automation_id": "auto-uuid-...",
    "status": "completed",
    "trigger_type": "api",
    "started_at": "2026-04-24T05:00:00Z",
    "completed_at": "2026-04-24T05:00:01Z",
    "duration_ms": 1240,
    "actions_total": 2,
    "actions_executed": 2,
    "actions_failed": 0,
    "actions_skipped": 0,
    "truncated": false,
    "action_results": [
      {
        "action_id": "action-uuid-...",
        "action_type": "send_gmail_email",
        "sequence": 1,
        "status": "success",
        "duration_ms": 820,
        "request": { "subject": "Following up", "body": "Hi John..." },
        "response": { "messageId": "msg-abc" },
        "error": null
      }
    ]
  }
}
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`