POST /api/v1/webhooks/bulk — Create Webhooks Bulk
This API allows you to configure multiple webhook URLs in the system. You can provide a list of webhook URLs along with their authentication tokens and default status. Once configured, the system will send relevant data to the provided URLs whenever specific events occur.
Authentication
SadqAuthorize
Request Headers
- Authorization (required)
- Bearer {token}
- Content-Type (required)
- application/json
Request Body
Content-Type: application/json
- webhookUrl (string, optional)
- The URL where the webhook data will be sent.
- headerToken (string, optional)
- Optional authentication token to include in webhook request headers.
- isDefault (string, optional)
- Indicates whether the webhook should be set as the default option.
[
{
"webhookUrl": "https://example.com/webhook1",
"headerToken": "Bearer secret_token_12345",
"isDefault": true
},
{
"webhookUrl": "https://example.com/webhook2",
"headerToken": "Bearer secret_token_67890",
"isDefault": false
}
]Webhook Callback Payload
When a webhook event is triggered, Sadq will send a POST request with the following JSON body:
{
"RequestId": "7bdc3c37-15e7-4c2b-9658-cd3c52c42457",
"Status": 1,
"Files": [
{
"FileName": "828f5487-ebe7-44fd-a2d7-1832a5ed5415.pdf",
"File": "Base64File"
}
],
"ReferencNumber": "Req-staging-2025-8266",
"Fields": [],
"Signatory": [
{
"Id": "5f7c322b-f2cf-460a-99e3-ad5becc96719",
"Status": "SIGNED",
"FullName": "Test New User",
"FullNameAr": "مستخدم جديد",
"NationalId": "2034485954",
"SignOrder": 0,
"Email": "test@sadq.sa",
"PhoneNumber": "",
"AuthenticationType": "WITHOUTVALIDATION",
"Gender": "MALE",
"Nationlity": "",
"RejectReason": null
},
{
"Id": "fc98e99a-7b12-493b-8370-024ea56f939d",
"Status": "SIGNED",
"FullName": "Hassan Hansan Hansan",
"FullNameAr": "حسن حسن حسن حسن",
"NationalId": "",
"SignOrder": 0,
"Email": "hasan@sadq.sa",
"PhoneNumber": "+962785789646",
"AuthenticationType": "SADQLOGIN",
"Gender": "MALE",
"Nationlity": "Jordan",
"RejectReason": null
}
]
}Responses
HTTP 200 — Bulk webhooks created
{
"data": [
{
"id": "7c8ae64f-57cd-4adc-93fe-f9ade7fc570c",
"webhookUrl": "https://drive.google.com/drive/u/4/my-drive22",
"accountId": "c0f63b10-f2e5-44e7-93b3-c78189ce392b",
"isDefault": false,
"headerToken": ""
},
{
"id": "502c1bfc-2f70-4634-b045-46684e8e1746",
"webhookUrl": "https://drive.google.com/drive/u/4/my-drive",
"accountId": "c0f63b10-f2e5-44e7-93b3-c78189ce392b",
"isDefault": false,
"headerToken": ""
}
],
"errorCode": 0,
"message": null,
"returnUrl": "/dashboard",
"stateValidationErrors": null,
"signature": ""
}