POST
/api/v1/subscriptions
Subscribe (register webhook).
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| scope | string | Yes | "document_type" or "document_id" |
| documentType | string | Yes | Target Document_Type |
| dId | string | If scope=document_id | Target D-Id (required when scope is "document_id") |
| callbackUrl | string | Yes | URL to receive webhook POSTs |
| options | object | No | Delivery options (see below) |
Options Sub-fields
| Field | Type | Required | Description |
|---|---|---|---|
| deliveryMode | string | No | "fire-and-forget" | "retry" (default: fire-and-forget) |
| payloadFormat | string | No | "envelope" | "raw" (default: envelope) |
| retrievalMode | string | No | "full" | "partial" (default: full) |
Response
201 Created
400 Bad Request
404 Document_Type not found
{
"id": "sub-abc123-0001",
"scope": "document_type",
"documentType": "temperature-readings",
"callbackUrl": "https://my-dashboard.example.com/webhook",
"options": {
"deliveryMode": "retry",
"payloadFormat": "envelope",
"retrievalMode": "full"
},
"active": true,
"createdAt": "2026-07-17T10:15:00Z"
}
Note: The webhook payload is snapshotted at the moment of update — delivery is decoupled from the store operation.