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 | No | Required when the `threads` destination is enabled. |
| agentId | string | No | Agent ID. |
| source | github | gitlab | slack | email | webhook | cron | custom | Yes | — |
| event | string | Yes | — |
| filters | object | No | — |
| action | object | Yes | — |
| action.type | send_message | Yes | — |
| action.destinations | workflows | databases | knowledge | tests | projects | threads[] | No | Product surfaces allowed to consume this webhook. Existing actions without this field default to `threads`. |
| 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. |
| action.projectId | string | No | Optional project context attached to the thread created by this webhook. |
| 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.organizationId | string | No | — |
| trigger.createdByUserId | string | No | — |
| trigger.name | string | No | Human-readable name. |
| trigger.environmentId | string | No | Computer ID. |
| trigger.agentId | string | No | Agent ID. |
| trigger.source | github | gitlab | 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.destinations | workflows | databases | knowledge | tests | projects | threads[] | No | Product surfaces allowed to consume this webhook. Existing actions without this field default to `threads`. |
| 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.action.projectId | string | No | Optional project context attached to the thread created by this webhook. |
| trigger.destinations | workflows | databases | knowledge | tests | projects | threads[] | No | Normalized destinations resolved from the action. |
| 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. |