Create webhook

http
POST /projects/{project_reference}/webhooks

Create a webhook when an external service must start an agent, task or workflow run, or when its deliveries must only be stored as webhook events; returns the webhook and its secret, which is shown only once. Requires project.agents.write.

Parameters

NameInRequiredDescription
project_referencepathYes

Request body

FieldTypeRequiredDescription
namestringYesWebhook name, 1-120 characters.
targetobjectYesTarget invoked by a webhook definition.
prompt_templatestringPrompt template for run targets: required unless target.kind is event, where it is not supported.
event_filterobject,nullOptional incoming event filter. Missing, null, or empty conditions accept every event.

Responses

StatusDescription
201Created webhook
400invalid_input: invalid body or parameters
401unauthenticated
403forbidden: a project member without the required capability
404not_found: project or webhook not found or not visible
500internal
503internal: authentication state is temporarily unavailable and the request was not processed; retry shortly