Reference API
Webhooky
Správa adres, na které DOOHUB posílá události, jejich doručení, testovací zpráva a výměna podpisového klíče. Webhooky jdou spravovat i v portálu (Nastavení → API).
Průvodce webhooky: události, podpis a opakování →Každý endpoint přijímá i hlavičku DOOHUB-Account (agentury: id klientského účtu).
Parametry
| Název | Typ | Popis |
|---|---|---|
| include_disabledv dotazu | boolean |
Chyby
401Missing, invalid or revoked API key.403The account's plan doesn't include the API (Business, Network, Pro or Agency), DOOHUB-Account is not a client of the agency (client_forbidden), or the endpoint needs DOOHUB Network (module_required).429More than 120 requests a minute; see Retry-After.
curl "https://admin.doohub.online/api/v1/webhooks" \
-H "Authorization: Bearer dh_…"{
"data": [
{
"id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
"url": "https://example.com/doohub",
"description": "string",
"events": [
"string"
],
"payout_events": false,
"enabled": false,
"disabled": {
"at": "2026-11-02T09:30:00Z",
"reason": "api"
},
"failures_in_row": 0,
"last_success_at": "2026-11-02T09:30:00Z",
"last_failure_at": "2026-11-02T09:30:00Z",
"created_at": "2026-11-02T09:30:00Z",
"updated_at": "2026-11-02T09:30:00Z"
}
],
"meta": {
"total": 0
}
}/webhooksAdd a webhook endpoint
Write key; at most 10 active endpoints. DOOHUB POSTs each event as JSON { id, type, created_at, account_id, data } to the public https address, with headers DOOHUB-Event, DOOHUB-Event-Id, DOOHUB-Delivery and DOOHUB-Signature: t=<unix seconds>,v1=<hex> where v1 = HMAC-SHA256 of <t>.<raw body> with the endpoint's secret. Check the signature and that t is recent, answer 2xx within 10 s; otherwise the delivery is retried after 1, 5, 30 minutes, 2, 6, 12 and 24 hours (then failed). An endpoint failing 50 times in a row and for over a day is switched off. Use the event id to ignore repeats. Events: campaign.status_changed, booking.requested, booking.decided, screen.status_changed, screen.offline, screen.alert, player.disconnected, market_order.status_changed, market_dispute.opened, market_dispute.closed, payout.status_changed (key with the finance scope), a group like booking.* or *. The secret is in this answer only.
Klíč pro zápis
Tělo požadavku
| Pole | Typ | Popis |
|---|---|---|
| urlpovinný | string (uri) | Public https address. |
| eventspovinný | string[] | |
| description | string | null |
Chyby
401Missing, invalid or revoked API key.403The plan doesn't include the API, the key can only read (write_required) or the client's role doesn't allow it (client_role).404Not found in this account.409The campaign is no longer a draft or rejected (not_editable).422Invalid input or a rule of the platform (code and message say which).429More than 120 requests a minute; see Retry-After.
curl -X POST "https://admin.doohub.online/api/v1/webhooks" \
-H "Authorization: Bearer dh_…" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/doohub","events":["string"],"description":"string"}'{
"url": "https://example.com/doohub",
"events": [
"string"
],
"description": "string"
}{
"data": {
"id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
"url": "https://example.com/doohub",
"description": "string",
"events": [
"string"
],
"payout_events": false,
"enabled": false,
"disabled": {
"at": "2026-11-02T09:30:00Z",
"reason": "api"
},
"failures_in_row": 0,
"last_success_at": "2026-11-02T09:30:00Z",
"last_failure_at": "2026-11-02T09:30:00Z",
"created_at": "2026-11-02T09:30:00Z",
"updated_at": "2026-11-02T09:30:00Z",
"secret": "string"
}
}Parametry
| Název | Typ | Popis |
|---|---|---|
| idv cestě · povinný | string (uuid) |
Chyby
401Missing, invalid or revoked API key.403The account's plan doesn't include the API (Business, Network, Pro or Agency), DOOHUB-Account is not a client of the agency (client_forbidden), or the endpoint needs DOOHUB Network (module_required).404Not found in this account.429More than 120 requests a minute; see Retry-After.
curl "https://admin.doohub.online/api/v1/webhooks/{id}" \
-H "Authorization: Bearer dh_…"{
"data": {
"id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
"url": "https://example.com/doohub",
"description": "string",
"events": [
"string"
],
"payout_events": false,
"enabled": false,
"disabled": {
"at": "2026-11-02T09:30:00Z",
"reason": "api"
},
"failures_in_row": 0,
"last_success_at": "2026-11-02T09:30:00Z",
"last_failure_at": "2026-11-02T09:30:00Z",
"created_at": "2026-11-02T09:30:00Z",
"updated_at": "2026-11-02T09:30:00Z"
}
}/webhooks/{id}Change a webhook endpoint
Write key. enabled: true switches an endpoint on again and clears its failures.
Klíč pro zápis
Parametry
| Název | Typ | Popis |
|---|---|---|
| idv cestě · povinný | string (uuid) |
Tělo požadavku
| Pole | Typ | Popis |
|---|---|---|
| url | string (uri) | |
| events | string[] | |
| description | string | null | |
| enabled | boolean |
Chyby
401Missing, invalid or revoked API key.403The plan doesn't include the API, the key can only read (write_required) or the client's role doesn't allow it (client_role).404Not found in this account.409The campaign is no longer a draft or rejected (not_editable).422Invalid input or a rule of the platform (code and message say which).429More than 120 requests a minute; see Retry-After.
curl -X PATCH "https://admin.doohub.online/api/v1/webhooks/{id}" \
-H "Authorization: Bearer dh_…" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/doohub","events":["string"],"description":"string","enabled":false}'{
"url": "https://example.com/doohub",
"events": [
"string"
],
"description": "string",
"enabled": false
}{
"data": {
"id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
"url": "https://example.com/doohub",
"description": "string",
"events": [
"string"
],
"payout_events": false,
"enabled": false,
"disabled": {
"at": "2026-11-02T09:30:00Z",
"reason": "api"
},
"failures_in_row": 0,
"last_success_at": "2026-11-02T09:30:00Z",
"last_failure_at": "2026-11-02T09:30:00Z",
"created_at": "2026-11-02T09:30:00Z",
"updated_at": "2026-11-02T09:30:00Z"
}
}/webhooks/{id}Switch a webhook endpoint off
Write key. Nothing is deleted; pending deliveries stop.
Klíč pro zápis
Parametry
| Název | Typ | Popis |
|---|---|---|
| idv cestě · povinný | string (uuid) |
Chyby
401Missing, invalid or revoked API key.403The plan doesn't include the API, the key can only read (write_required) or the client's role doesn't allow it (client_role).404Not found in this account.409The campaign is no longer a draft or rejected (not_editable).422Invalid input or a rule of the platform (code and message say which).429More than 120 requests a minute; see Retry-After.
curl -X DELETE "https://admin.doohub.online/api/v1/webhooks/{id}" \
-H "Authorization: Bearer dh_…"(bez obsahu)/webhooks/{id}/deliveriesRecent deliveries of an endpoint
The last 100 with the payload, attempts, last HTTP status and error. Kept 30 days.
Jakýkoli klíč
Parametry
| Název | Typ | Popis |
|---|---|---|
| idv cestě · povinný | string (uuid) | |
| statusv dotazu | pending | sent | failed |
Chyby
401Missing, invalid or revoked API key.403The account's plan doesn't include the API (Business, Network, Pro or Agency), DOOHUB-Account is not a client of the agency (client_forbidden), or the endpoint needs DOOHUB Network (module_required).429More than 120 requests a minute; see Retry-After.
curl "https://admin.doohub.online/api/v1/webhooks/{id}/deliveries" \
-H "Authorization: Bearer dh_…"{
"data": [
{
"id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
"event_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
"event_type": "string",
"status": "pending",
"attempts": 0,
"next_attempt_at": "2026-11-02T09:30:00Z",
"last_status": 0,
"last_error": "string",
"created_at": "2026-11-02T09:30:00Z",
"delivered_at": "2026-11-02T09:30:00Z",
"payload": {}
}
],
"meta": {
"total": 0
}
}/webhooks/{id}/testSend a test event
Write key. Queues a ping event for the endpoint (sent within about a minute).
Klíč pro zápis
Parametry
| Název | Typ | Popis |
|---|---|---|
| idv cestě · povinný | string (uuid) |
Chyby
401Missing, invalid or revoked API key.403The plan doesn't include the API, the key can only read (write_required) or the client's role doesn't allow it (client_role).404Not found in this account.409The campaign is no longer a draft or rejected (not_editable).422Invalid input or a rule of the platform (code and message say which).429More than 120 requests a minute; see Retry-After.
curl -X POST "https://admin.doohub.online/api/v1/webhooks/{id}/test" \
-H "Authorization: Bearer dh_…"{
"data": {
"event_id": "string",
"type": "string"
}
}/webhooks/{id}/rotate-secretNew signing secret
Write key. The old secret stops at once; the new one is in this answer only.
Klíč pro zápis
Parametry
| Název | Typ | Popis |
|---|---|---|
| idv cestě · povinný | string (uuid) |
Chyby
401Missing, invalid or revoked API key.403The plan doesn't include the API, the key can only read (write_required) or the client's role doesn't allow it (client_role).404Not found in this account.409The campaign is no longer a draft or rejected (not_editable).422Invalid input or a rule of the platform (code and message say which).429More than 120 requests a minute; see Retry-After.
curl -X POST "https://admin.doohub.online/api/v1/webhooks/{id}/rotate-secret" \
-H "Authorization: Bearer dh_…"{
"data": {
"id": "string",
"secret": "string"
}
}