Skip to main content

Webhooks

Webhook callbacks for document state changes. Webhooks are triggered when documents are created, updated, or deleted.

Document State Changes​

Webhooks are triggered on the following document state changes:

  • Create - When a document is created
  • Update - When a document is updated
  • Delete - When a document is deleted

Callback URL Requirements​

Callback URLs must meet the following conditions:

  • Must be HTTPS
  • Cannot be localhost or localdomain
  • Cannot be an IP address (IPv4 or IPv6)
  • Must be resolvable for the API (no internal/local domains)

Webhook Callback​

When a document state change occurs, the API will send a POST request to the configured webhook URL.

Callback Headers​

The following headers are always present in webhook callbacks:

HeaderDescription
X-Scriptix-SessionThe Scriptix Transcript Session ID
X-Scriptix-DocumentThe document ID
Content-Typeapplication/json

Custom headers can be configured, but the headers above are not overridable.

Callback Body​

The callback body is a JSON object:

{
"sessionId": "string",
"documentId": "string"
}
FieldTypeDescription
sessionIdstringThe Scriptix Transcript Session ID
documentIdstringThe document ID

Automatic Retry​

The webhook endpoint must respond with a 2XX status code within 20 seconds or the request will be marked as failed. Failed requests trigger automatic retries at the following intervals:

DelayTime After State Change
00:00Immediate
01:001 minute
02:003 minutes
05:008 minutes
15:0023 minutes
30:0053 minutes

If a callback fails after the final retry (53 minutes), the callback is abandoned and no further notifications are sent.

Webhook Management​

List Webhooks​

GET /api/v3/admin/customer/{customer_id}/webhooks

Query Parameters:

ParameterTypeDescription
limitnumberMaximum number of results to return
offsetnumberNumber of results to skip
qstringSearch query

Get Webhook​

GET /api/v3/admin/customer/{customer_id}/webhooks/{webhook_id}

Response:

{
"count": 1,
"total_result": 1,
"result": {
"id": 123,
"type": "string",
"webhook_url": "https://example.com/webhook",
"webhook_method": "POST",
"webhook_headers": ["Authorization: Bearer token"],
"organization_id": 456,
"created_at": "2026-01-15T10:00:00Z",
"last_modified": "2026-01-15T10:00:00Z"
}
}

Create Webhook​

POST /api/v3/admin/customer/{customer_id}/webhooks

Request Body:

{
"type": "string",
"webhook_url": "https://example.com/webhook",
"webhook_method": "POST",
"webhook_headers": ["Authorization: Bearer token"],
"organization_id": "456"
}
FieldTypeRequiredDescription
typestringYesWebhook type
webhook_urlstringYesHTTPS URL for webhook callbacks
webhook_methodstringYesHTTP method (e.g., POST)
webhook_headersstring[]YesCustom headers to include
organization_idstringNoOrganization identifier

Update Webhook​

PUT /api/v3/admin/customer/{customer_id}/webhooks/{webhook_id}

Request Body: Same as Create Webhook

Delete Webhook​

DELETE /api/v3/admin/customer/{customer_id}/webhooks/{webhook_id}

Webhook Configuration in Document Upload​

The webhook_url field can be included when uploading documents. The webhook URL is stored as part of document settings and will be used for callbacks related to that document.

Notes​

  • Webhooks require admin (SYSOP) access to configure via the back-office interface
  • Custom headers can be configured for authentication purposes
  • Webhook callbacks are performed for document state changes only
  • The webhook endpoint must be publicly accessible and respond quickly (within 20 seconds)

Next Steps​