Skip to main content
PATCH
Update a webhook endpoint

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Webhook endpoint ID: whk_ followed by 20 hex characters.

Pattern: ^whk_[0-9a-f]{20}$

Body

application/json
url
string

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 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

Replaces all filters. Send {} to clear them.

description
string | null

Your own note about what this endpoint is for.

Maximum string length: 500
status
enum<string>

Enable to resume an endpoint disabled for failing; only new events are sent.

Available options:
enabled,
disabled

Response

Updated endpoint.

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