Obsah dokumentace

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).

get/webhooks

Webhook endpoints of the account

Jakýkoli klíč

Parametry

NázevTypPopis
include_disabledv dotazuboolean

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.
Požadavek
curl "https://admin.doohub.online/api/v1/webhooks" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "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
  }
}
post/webhooks

Add 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

PoleTypPopis
urlpovinnýstring (uri)Public https address.
eventspovinnýstring[]
descriptionstring | 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.
Požadavek
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"}'
Příklad těla
{
  "url": "https://example.com/doohub",
  "events": [
    "string"
  ],
  "description": "string"
}
Odpověď 201
{
  "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"
  }
}
get/webhooks/{id}

One webhook endpoint

Jakýkoli klíč

Parametry

NázevTypPopis
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.
Požadavek
curl "https://admin.doohub.online/api/v1/webhooks/{id}" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "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"
  }
}
patch/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ázevTypPopis
idv cestě · povinnýstring (uuid)

Tělo požadavku

PoleTypPopis
urlstring (uri)
eventsstring[]
descriptionstring | null
enabledboolean

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.
Požadavek
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}'
Příklad těla
{
  "url": "https://example.com/doohub",
  "events": [
    "string"
  ],
  "description": "string",
  "enabled": false
}
Odpověď 200
{
  "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"
  }
}
delete/webhooks/{id}

Switch a webhook endpoint off

Write key. Nothing is deleted; pending deliveries stop.

Klíč pro zápis

Parametry

NázevTypPopis
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.
Požadavek
curl -X DELETE "https://admin.doohub.online/api/v1/webhooks/{id}" \
  -H "Authorization: Bearer dh_…"
Odpověď 204
(bez obsahu)
get/webhooks/{id}/deliveries

Recent deliveries of an endpoint

The last 100 with the payload, attempts, last HTTP status and error. Kept 30 days.

Jakýkoli klíč

Parametry

NázevTypPopis
idv cestě · povinnýstring (uuid)
statusv dotazupending | 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.
Požadavek
curl "https://admin.doohub.online/api/v1/webhooks/{id}/deliveries" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "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
  }
}
post/webhooks/{id}/test

Send a test event

Write key. Queues a ping event for the endpoint (sent within about a minute).

Klíč pro zápis

Parametry

NázevTypPopis
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.
Požadavek
curl -X POST "https://admin.doohub.online/api/v1/webhooks/{id}/test" \
  -H "Authorization: Bearer dh_…"
Odpověď 202
{
  "data": {
    "event_id": "string",
    "type": "string"
  }
}
post/webhooks/{id}/rotate-secret

New signing secret

Write key. The old secret stops at once; the new one is in this answer only.

Klíč pro zápis

Parametry

NázevTypPopis
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.
Požadavek
curl -X POST "https://admin.doohub.online/api/v1/webhooks/{id}/rotate-secret" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "data": {
    "id": "string",
    "secret": "string"
  }
}

Cookies jsou malé soubory, které si web ukládá ve vašem prohlížeči. Nezbytné nelze vypnout, ostatní kategorie povolujete vy.

Nezbytné

Vždy zapnuté

Přihlášení, volba účtu a jazyka, uložení vaší volby cookies a ochrana plateb. Bez nich web nefunguje.

sb-…-auth-token, doohub_account, NEXT_LOCALE, doohub_consent, doohub_ref, doohub_sidebar, doohub_menu, doohub_theme, doohub_support_return, doohub_mfa_later, doohub_signed_in, __stripe_mid, __stripe_sid

Žádné analytické ani marketingové cookies nepoužíváme, proto se vás na souhlas neptáme. Kdybychom je zavedli, zeptáme se předem.