Reference
REST API
REST API reference for endpoints, events, deliveries, replays, and workspaces, with authentication, scopes, pagination, and error codes.
The API uses predictable resource URLs, JSON bodies, and bearer authentication. All requests must use HTTPS.
- Base URL:
https://api.hooks.events/v1 - Authentication:
Authorization: Bearer hks_... - Scopes:
endpoints:read,endpoints:write,deliveries:read,deliveries:retry,history:purge,metrics:read,alerts:read,alerts:write,mcp:write. - Session-authenticated requests can select a workspace with
X-Workspace-Id: <workspace-id>. Reads fall back to the caller’s own workspace when the id no longer belongs to them (stalelocalStorage); mutating requests return403 AUTHORIZATION_DENIEDinstead of silently writing elsewhere. - Mutating requests with a body must send
Content-Type: application/json.
Operations
Section titled “Operations”Every operation below is generated from the OpenAPI 3.1 document at https://api.hooks.events/openapi.json. Browse it under OpenAPI operations or download the raw document and generate a client.
Searching events
Section titled “Searching events”GET /v1/events accepts two content filters on top of endpointId, status, and cursor pagination:
qmatches a substring in the inline payload or request headers (max 200 characters).filtermatches a field path:body.<path>=<value>orheaders.<name>=<value>, up to 8 levels deep. Values compare as text, sobody.amount=100matches both100and"100". Quote values containing spaces:headers.x-label="needs review".
curl -H "Authorization: Bearer $HOOKS_API_KEY" \ "https://api.hooks.events/v1/events?q=ORD-1042&limit=20"curl -H "Authorization: Bearer $HOOKS_API_KEY" \ "https://api.hooks.events/v1/events?filter=body.data.object.id=ch_123"Both options scan stored JSON with SQLite LIKE/json_extract, so keep the result limit small and combine them with endpoint/status filters. Search only covers events whose payload is still stored inline; payloads moved to object storage by retention cannot be matched. A malformed field path returns 400 VALIDATION_ERROR.
Authentication and rate limits
Section titled “Authentication and rate limits”- API keys carry scopes. A key without the route’s scope gets
403 AUTHORIZATION_DENIED. /v1/*allows 600 requests per minute per credential. Responses carryX-RateLimit-Limit,X-RateLimit-RemainingandX-RateLimit-Reset; over the limit you get429 RATE_LIMIT_EXCEEDEDwithRetry-After.- Inbound
/in/{publicId}requests are limited per endpoint and per workspace. A Free workspace that exhausts its lifetime grant gets429withx-quota-limitand anupgrade_url;/t/*and/inspect/*never consume quota.
Machine-readable contract
Section titled “Machine-readable contract”GET https://api.hooks.events/openapi.json returns the OpenAPI 3.1 document that generates the table above. The sandbox callback endpoints under /callbacks/tasks/* are token-authenticated and intentionally excluded: they are called by run sandboxes, not by API clients.
Environments and scoped values
Section titled “Environments and scoped values”Every workspace starts with one default environment, production. Endpoints and tasks accept environmentId to bind to another environment; null or omitted means the default. Environment-scoped secrets and variables override project-level rows of the same name.
- A test event (
POST /v1/endpoints/{id}/test-events), preview, or task run may pass a one-offenvironmentId; it overrides the endpoint/task binding for that request. - Deliveries and task runs expose
environmentId; task-run views also includeenvironmentName. GET /v1/environments/{id}/resolvedreturns{ secrets: [{ name, source, lastUsedAt }], variables: [{ name, value, source }] }, wheresourceisenvironmentordefault. Secret values and ciphertext are never returned.- Variables are plaintext by design. A credential-looking variable name gets a
warningon create; store credentials as secrets instead.
Example
Section titled “Example”curl "https://api.hooks.events/v1/endpoints" \ -H "Authorization: Bearer $HOOKS_API_KEY"Create an API key in Settings → API keys. Keys are scoped and can be revoked at any time.