Webhooks
Create a webhook endpoint
No auth requiredCreates a webhook endpoint with a capture URL. Without an API key the response includes a one-time `claim_token`.
POST
/api/webhooksRequest body
namestringrequireddescriptionstring | nullmax_eventsinteger | nullResponses
201The created webhook endpoint.
idstringUnique identifier for the webhook endpoint, prefixed with `wh_`.Example: "wh_xxxxxxxxxxxxxxxxxxxxxxxx"object"webhook_endpoint"organization_idstring | nullOwning organization ID, or null if the resource is public (created without an API key).namestringdescriptionstring | nullurlstringPublic capture URL (…/api/catch/{id}) that records requests.max_eventsintegerMaximum number of events retained. Defaults to 100.event_countintegerNumber of captured events. Present on single-resource reads.created_atinteger | nullWhen the endpoint was created. Unix timestamp in seconds.updated_atinteger | nullWhen the endpoint was last updated. Unix timestamp in seconds.claim_tokenstringOne-time token to claim ownership of this resource via POST /api/claim/{id}. Only present when created without an API key.claim_urlstringRelative URL for claiming the resource.400The request was malformed or failed validation.
errorobjecttype"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"codestringMachine-readable error code.messagestringHuman-readable error message.paramstring | nullThe offending parameter, when applicable.401No valid API key was provided.
errorobjecttype"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"codestringMachine-readable error code.messagestringHuman-readable error message.paramstring | nullThe offending parameter, when applicable.Example request
curl
curl -X POST https://agtls.dev/api/webhooks \
-H "Content-Type: application/json" \
-d '{ … }'