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

answer.completed and answer.failed fire when an answer finishes. session.message.completed and session.message.failed fire when the agent finishes replying to a message in a session started with POST /sessions, and session.message.needs_input when it stops to ask questions about that message. form_comparison.completed and form_comparison.failed fire when a form comparison finishes. loss_review.completed and loss_review.failed fire when a loss review finishes; saved partial matters remain available. osha.employer.event_added fires when an OSHA inspection, accident or other event first appears for an employer; it needs the OSHA dataset. rsl_log.written fires when a write to an RSL program’s log is kept: the log opening, and each write that records entries. underwriting_submission.extraction.completed and underwriting_submission.extraction.failed fire once when an extraction of an underwriting submission ends (failed also when it is cancelled), only to endpoints whose owner (who created the endpoint, or last changed its url) can read the submission. underwriting_submission.updated fires on each write to an underwriting submission’s log (a value set or accepted, a quote, a bind or a decline), with the log’s status after it, only to such endpoints; read the submission for its stage, rating and quotes.

Available options:
answer.completed,
answer.failed,
form_comparison.completed,
form_comparison.failed,
loss_review.completed,
loss_review.failed,
osha.employer.event_added,
rsl_log.written,
session.message.completed,
session.message.failed,
session.message.needs_input,
underwriting_submission.extraction.completed,
underwriting_submission.extraction.failed,
underwriting_submission.updated
filters
object

Narrow what is sent. Each filter applies only to events that carry that field, so answer and session events ignore employer, program 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. session.message.completed and session.message.failed fire when the agent finishes replying to a message in a session started with POST /sessions, and session.message.needs_input when it stops to ask questions about that message. form_comparison.completed and form_comparison.failed fire when a form comparison finishes. loss_review.completed and loss_review.failed fire when a loss review finishes; saved partial matters remain available. osha.employer.event_added fires when an OSHA inspection, accident or other event first appears for an employer; it needs the OSHA dataset. rsl_log.written fires when a write to an RSL program’s log is kept: the log opening, and each write that records entries. underwriting_submission.extraction.completed and underwriting_submission.extraction.failed fire once when an extraction of an underwriting submission ends (failed also when it is cancelled), only to endpoints whose owner (who created the endpoint, or last changed its url) can read the submission. underwriting_submission.updated fires on each write to an underwriting submission’s log (a value set or accepted, a quote, a bind or a decline), with the log’s status after it, only to such endpoints; read the submission for its stage, rating and quotes.

Available options:
answer.completed,
answer.failed,
form_comparison.completed,
form_comparison.failed,
loss_review.completed,
loss_review.failed,
osha.employer.event_added,
rsl_log.written,
session.message.completed,
session.message.failed,
session.message.needs_input,
underwriting_submission.extraction.completed,
underwriting_submission.extraction.failed,
underwriting_submission.updated
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.