Skip to main content
POST
Rate limit tier: general, 600 requests/min. See Rate limits. Subscribes an HTTPS endpoint to the events you name. events is required and takes at least one event. The response carries the webhook’s secret, the key that verifies each delivery. Store it: no other response returns it. The URL must use HTTPS and resolve to a public address. A URL that resolves to a private or reserved address answers 400 INVALID_VALUE, and one whose hostname does not resolve answers 422 URL_UNREACHABLE. An organization that already holds 50 webhooks answers 409 WEBHOOK_SUBSCRIPTION_LIMIT. Send a ping to check the endpoint before a run ends.

Authorizations

Authorization
string
header
required

API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.

Body

application/json
url
string
required

The HTTPS endpoint that receives the events. It must resolve to a public address.

Maximum string length: 2048
Pattern: ^https://
Example:

"https://example.com/webhooks/anyformat"

events
enum<string>[]
required

Event types the endpoint receives. run.completed: a run ended processed. run.failed: a run ended error. run.cancelled: a run ended cancelled.

Minimum array length: 1
Available options:
run.completed,
run.failed,
run.cancelled
Example:

Response

Successful Response

id
string
required

Unique identifier of the webhook (hyphenated UUID).

Example:

"069dcc2c-e14c-7606-8000-2ee4fb17b4e3"

url
string
required

The endpoint that receives the events.

Example:

"https://example.com/webhooks/anyformat"

events
enum<string>[]
required

Event types the endpoint receives. run.completed: a run ended processed. run.failed: a run ended error. run.cancelled: a run ended cancelled.

Available options:
run.completed,
run.failed,
run.cancelled
Example:
created_at
string<date-time>
required

Timestamp when the webhook was created (ISO 8601).

secret
string
required

The signing secret, whsec_ and base64. Verify each delivery's webhook-signature with it. Only this response carries it: store it securely.

Example:

"whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"