Webhooks
Webhooks let ACP move from manual execution to event-driven operation. External systems can call into ACP to start threads, trigger project workflows, or connect runtime resources to the rest of your stack.
The fastest setup path is: create or pick the target computer, create a trigger, wire your external system to the returned webhook URL, then validate everything with the trigger test endpoint before sending live events.
1. Choose the ACP target for the webhook
Before creating the webhook itself, decide what environment the inbound event should run against. Every trigger must point at a computer via `environmentId`, and it can optionally lock execution to a specific agent with `agentId`.
2. Create the trigger
Create the trigger first. ACP returns both a `webhookUrl` and a `webhookSecret`. In the ACP settings UI, you choose the source, event, computer, optional agent, and action. Use `Start thread` when the event should launch a new thread, or `Comment on pull request` when a GitHub PR event should result in a comment posted back to the PR.
3. Deliver signed events to ACP
Send your external event to the returned `webhookUrl`. ACP verifies signatures before executing anything. For generic `webhook` and `custom` sources, sign the raw request body with HMAC-SHA256 using the returned `webhookSecret` and send the digest in `X-Webhook-Signature`. Also include the logical event name in `X-Webhook-Event`. For GitHub webhooks, paste the ACP `webhookUrl` and `webhookSecret` directly into the repository webhook settings and let GitHub deliver signed payloads for you.
4. Test, inspect, and operationalize
Use ACP’s trigger test endpoint before wiring the webhook into a live system. Once delivery is live, inspect execution history so every inbound event remains auditable through trigger executions and the threads created by those executions.