agenttools
Webhooks

Create a webhook endpoint

No auth required

Creates a webhook endpoint with a capture URL. Without an API key the response includes a one-time `claim_token`.

POST/api/webhooks

Request body

namestringrequired
descriptionstring | null
max_eventsinteger | null

Responses

201The created webhook endpoint.
idstring
Unique identifier for the webhook endpoint, prefixed with `wh_`.Example: "wh_xxxxxxxxxxxxxxxxxxxxxxxx"
object"webhook_endpoint"
organization_idstring | null
Owning organization ID, or null if the resource is public (created without an API key).
namestring
descriptionstring | null
urlstring
Public capture URL (…/api/catch/{id}) that records requests.
max_eventsinteger
Maximum number of events retained. Defaults to 100.
event_countinteger
Number of captured events. Present on single-resource reads.
created_atinteger | null
When the endpoint was created. Unix timestamp in seconds.
updated_atinteger | null
When the endpoint was last updated. Unix timestamp in seconds.
claim_tokenstring
One-time token to claim ownership of this resource via POST /api/claim/{id}. Only present when created without an API key.
claim_urlstring
Relative URL for claiming the resource.
400The request was malformed or failed validation.
errorobject
type"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"
codestring
Machine-readable error code.
messagestring
Human-readable error message.
paramstring | null
The offending parameter, when applicable.
401No valid API key was provided.
errorobject
type"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"
codestring
Machine-readable error code.
messagestring
Human-readable error message.
paramstring | null
The offending parameter, when applicable.

Example request

curl
curl -X POST https://agtls.dev/api/webhooks \
  -H "Content-Type: application/json" \
  -d '{ … }'