Webhooks
Create Webhook
Section titled “Create Webhook”-
Endpoint:
POST /v1/webhook -
Description: Registers a webhook endpoint.
-
Headers:
Authorization: Bearer <accessToken>x-signed-request: <signature>
-
Body:
Field Type Required Description url string Yes Destination URL eventTriggers string[] Yes Allowed events signatureToken string Yes UUID used to sign webhook payloads -
Allowed eventTriggers:
open-round,close-round -
Success Response (201):
{ "status": "success", "data": { "webhookId": "507f1f77bcf86cd799439077" }}- Errors:
400,401,409,500
List Webhooks
Section titled “List Webhooks”-
Endpoint:
GET /v1/webhook -
Description: Lists webhooks for the API client.
-
Headers:
Authorization: Bearer <accessToken> -
Success Response (200):
{ "status": "success", "data": [ { "id": "507f1f77bcf86cd799439077", "url": "https://hooks.example.com/igaming", "eventTriggers": ["open-round", "close-round"], "signatureToken": "9f1e2d3c-4b5a-6789-0123-456789abcdef", "status": "active", "createdAt": "2025-01-02T10:00:00.000Z", "lastTriggered": null, "failureCount": 0, "successCount": 0 } ]}- Errors:
401,500
List Webhook Logs
Section titled “List Webhook Logs”-
Endpoint:
GET /v1/webhook/{webhookId} -
Description: Lists delivery logs for a webhook.
-
Headers:
Authorization: Bearer <accessToken> -
Query Params:
Field Type Required Description dateStart string No YYYY-MM-DD dateEnd string No YYYY-MM-DD pageIndex number No Default 1 pageSize number No 1 to 100 status string No success,failed, orpending -
Success Response (200):
{ "status": "success", "data": [ { "id": "log_001", "webhookId": "507f1f77bcf86cd799439077", "eventType": "open-round", "payload": { "example": "payload" }, "responseCode": 200, "responseBody": "OK", "success": true, "duration": 120, "timestamp": "2025-01-02T12:00:00.000Z", "retryCount": 0, "errorMessage": null } ], "pagination": { "pageIndex": 1, "pageSize": 20, "totalCount": 1, "successCount": 1, "failureCount": 0 }}- Errors:
400,401,404,500
Delete Webhook
Section titled “Delete Webhook”-
Endpoint:
DELETE /v1/webhook/{webhookId} -
Description: Removes a webhook.
-
Headers:
Authorization: Bearer <accessToken> -
Success Response (200):
{ "status": "success" }- Errors:
400,401,404,500