API reference
Webhook Endpoint
| Property | Value |
|---|---|
| Protocol | HTTPS only (TLS 1.2 or higher) |
| Method | POST |
| Content-Type | application/json |
| Response Required | Yes (within 3-5 seconds) |
| Status Codes | 200, 4xx, or 5xx |
Request Headers
| Header | Required | Example | Purpose |
|---|---|---|---|
| Authorization | No | Custom value | Authentication if required by your endpoint |
| Content-Type | Yes | application/json | Specifies JSON payload |
| X-SCALAR-Signature | Yes | sha256=abc123... | HMAC-SHA256 signature for validation |
| Custom Headers | No | As configured | Your custom headers (up to 5) |
Request Body
The webhook payload contains a batch of events in the following structure:
{
"eventBatchId": "string (UUID)",
"eventSubscriptionId": "string (UUID)",
"eventBatchTime": "string (ISO-8601)",
"eventsData": [
{
"eventType": "string",
"eventVersion": "integer",
"eventData": {
// Event-specific payload
}
}
]
}Request Parameters Explained
eventBatchId: Unique identifier for this specific batch of events
- eventSubscriptionId: Identifies which subscription this batch is for
- eventBatchTime: UTC timestamp when the batch was sent
- eventsData: Array of individual events in the batch
Response Requirements
Your webhook endpoint must respond with:
{
"statusCode": 200 | 4xx | 5xx,
"message": "string (optional)"
}HTTP Status Codes:
| Status Code | Meaning | SCALAR Action |
|---|---|---|
| 200 | Success | Mark delivery as successful, proceed to next batch |
| 204 | No Content | Treat as successful delivery |
| 4xx | Client Error | Log error, do NOT retry (indicates configuration issue) |
| 5xx | Server Error | Retry delivery with exponential backoff |
| Timeout | No Response | Retry delivery with exponential backoff |
Updated about 2 hours ago