Create trigger
POST
/v1/triggersCreate an event-driven trigger, including webhook-based automations.
How to call this endpoint
Every ACP API request uses bearer authentication. The examples here show the actual request path, auth header, and body shape that the platform expects.
Path, query, and header parameters
These parameters control which ACP object the endpoint acts on and how the request is processed.
Path parameters
None.
Query parameters
None.
Body schema
Content type: application/json · Required
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Human-readable name. |
| environmentId | string | Yes | Computer ID. |
| agentId | string | No | Agent ID. |
| source | github | slack | email | webhook | cron | custom | Yes | — |
| event | string | Yes | — |
| filters | object | No | — |
| action | object | Yes | — |
| action.type | send_message | Yes | — |
| action.prompt | string | No | Prompt passed into the trigger execution thread. |
| action.message | string | No | Backward-compatible alias for `prompt`. |
| action.template | string | No | Legacy template field. Use `prompt` for new integrations. |
| enabled | boolean | No | — |
What the API returns
Each response code below includes the documented payload shape for the ACP API.
201Trigger createdapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| trigger | object | No | — |
| trigger.id | string | No | Unique identifier. |
| trigger.userId | string | No | User ID. |
| trigger.name | string | No | Human-readable name. |
| trigger.environmentId | string | No | Computer ID. |
| trigger.agentId | string | No | Agent ID. |
| trigger.source | github | slack | email | webhook | cron | custom | No | — |
| trigger.event | string | No | — |
| trigger.filters | object | No | — |
| trigger.action | object | No | — |
| trigger.action.type | send_message | Yes | — |
| trigger.action.prompt | string | No | Prompt passed into the trigger execution thread. |
| trigger.action.message | string | No | Backward-compatible alias for `prompt`. |
| trigger.action.template | string | No | Legacy template field. Use `prompt` for new integrations. |
| trigger.enabled | boolean | No | — |
| trigger.webhookSecret | string | No | — |
| trigger.webhookUrl | string | No | — |
| trigger.lastTriggeredAt | string | No | — |
| trigger.createdAt | string | No | ISO 8601 timestamp. |
| trigger.updatedAt | string | No | ISO 8601 timestamp. |