Skip to main content
POST
Create a webhook endpoint

Authorizations

Authorization
string
header
required

Effective API key. Send Authorization: Bearer sk-eai-...

Body

application/json
url
string
required

Public HTTPS URL that receives signed POST requests. Credentials in the URL and private or local hosts are rejected.

Maximum string length: 2048
enabledEvents
enum<string>[]
required
Required array length: 1 - 3 elements

answer.completed and answer.failed fire when an answer finishes. osha.employer.event_added fires when an OSHA inspection, accident or other event first appears for an employer; it needs the OSHA dataset.

Available options:
answer.completed,
answer.failed,
osha.employer.event_added
filters
object

Narrow what is sent. Each filter applies only to events that carry that field, so answer events ignore employer and state filters. Within a filter any value matches; across filters all must match.

description
string | null

Your own note about what this endpoint is for.

Maximum string length: 500

Response

Endpoint created, with its signing secret.

id
string
required

Webhook endpoint ID: whk_ followed by 20 hex characters.

Pattern: ^whk_[0-9a-f]{20}$
url
string<uri>
required

Public HTTPS URL that receives signed POST requests. Credentials in the URL and private or local hosts are rejected.

description
string | null
required
enabledEvents
enum<string>[]
required

answer.completed and answer.failed fire when an answer finishes. osha.employer.event_added fires when an OSHA inspection, accident or other event first appears for an employer; it needs the OSHA dataset.

Available options:
answer.completed,
answer.failed,
osha.employer.event_added
filters
object
required
status
enum<string>
required

Disabled endpoints receive nothing until enabled again.

Available options:
enabled,
disabled
disabledReason
enum<string> | null
required

caller: you disabled it. failing: deliveries failed for three days, so it was disabled and its queued events were dropped. Null when enabled.

Available options:
caller,
failing,
null
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
secret
string
required

Signing secret (whsec_…). Shown only in this response; store it to verify the Effective-Signature header.