Obsah dokumentace

Reference API

Kampaně

Kampaně účtu a s klíčem pro zápis jejich zakládání: koncept, rezervace ploch, nahrání kreativ a odeslání ke schválení. Odeslání kontroluje totéž co portál – termín, plochy, kreativy, volné sloty a kredit.

Postup zápisu kampaně
curl -X POST https://admin.doohub.online/api/v1/campaigns -H "Authorization: Bearer dh_…" -H "Content-Type: application/json" \
  -d '{"name":"Podzimní akce","starts_on":"2026-11-02","ends_on":"2026-11-15","spot_seconds":15}'
curl -X PUT https://admin.doohub.online/api/v1/campaigns/{id}/screens/{screenId} … -d '{"pricing_model":"cpm","plays":5000}'
curl -X POST https://admin.doohub.online/api/v1/campaigns/{id}/creatives/uploads … -d '{"mime":"image/jpeg","size":482113}'
curl -X PUT "{upload_url}" -H "Content-Type: image/jpeg" --data-binary @spot.jpg
curl -X POST https://admin.doohub.online/api/v1/campaigns/{id}/creatives … -d '{"path":"{path}","width":1920,"height":1080}'
curl -X POST https://admin.doohub.online/api/v1/campaigns/{id}/submit -H "Authorization: Bearer dh_…"

Každý endpoint přijímá i hlavičku DOOHUB-Account (agentury: id klientského účtu).

get/campaigns

The account's campaigns

Jakýkoli klíč

Parametry

NázevTypPopis
statusv dotazudraft | pending_review | approved | rejected | cancelled
limitv dotazuinteger
offsetv dotazuinteger

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/campaigns" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "data": [
    {
      "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
      "name": "string",
      "status": "draft",
      "objective": "string",
      "category": "string",
      "starts_on": "2026-11-02",
      "ends_on": "2026-11-02",
      "spot_seconds": 0,
      "total": {
        "currency": "CZK",
        "amount_minor": 0
      },
      "submitted_at": "2026-11-02T09:30:00Z",
      "reviewed_at": "2026-11-02T09:30:00Z",
      "rejection_reason": "string",
      "created_at": "2026-11-02T09:30:00Z"
    }
  ],
  "meta": {
    "total": 0,
    "limit": 0,
    "offset": 0
  }
}
post/campaigns

Create a draft campaign

Write key. The currency is the account's.

Klíč pro zápis

Tělo požadavku

PoleTypPopis
namepovinnýstring
objectivestring | null
categoryretail | food | automotive | finance | health | beauty | travel | entertainment | real_estate | education | services | public | alcohol | gambling | politics | other | null
starts_onstring (date) | null
ends_onstring (date) | null
spot_seconds5 | 10 | 15 | 20 | 30 | 45 | 60

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/campaigns" \
  -H "Authorization: Bearer dh_…" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","objective":"string","category":"retail","starts_on":"2026-11-02","ends_on":"2026-11-02","spot_seconds":15}'
Příklad těla
{
  "name": "string",
  "objective": "string",
  "category": "retail",
  "starts_on": "2026-11-02",
  "ends_on": "2026-11-02",
  "spot_seconds": 15
}
Odpověď 201
{
  "data": {
    "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
    "name": "string",
    "status": "draft",
    "objective": "string",
    "category": "string",
    "starts_on": "2026-11-02",
    "ends_on": "2026-11-02",
    "spot_seconds": 0,
    "total": {
      "currency": "CZK",
      "amount_minor": 0
    },
    "submitted_at": "2026-11-02T09:30:00Z",
    "reviewed_at": "2026-11-02T09:30:00Z",
    "rejection_reason": "string",
    "created_at": "2026-11-02T09:30:00Z",
    "screens": [
      {
        "screen_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
        "screen_name": "string",
        "pricing_model": "cpm",
        "plays": 0,
        "max_plays_per_day": 0,
        "slots": 0,
        "price_minor": 0,
        "owner_status": "string"
      }
    ],
    "creatives": [
      {
        "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
        "kind": "image",
        "mime": "string",
        "size_bytes": 0,
        "width": 0,
        "height": 0,
        "duration_seconds": 0,
        "file_name": "string",
        "created_at": "2026-11-02T09:30:00Z"
      }
    ]
  }
}
get/campaigns/{id}

One campaign with its booked screens and creatives

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/campaigns/{id}" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "data": {
    "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
    "name": "string",
    "status": "draft",
    "objective": "string",
    "category": "string",
    "starts_on": "2026-11-02",
    "ends_on": "2026-11-02",
    "spot_seconds": 0,
    "total": {
      "currency": "CZK",
      "amount_minor": 0
    },
    "submitted_at": "2026-11-02T09:30:00Z",
    "reviewed_at": "2026-11-02T09:30:00Z",
    "rejection_reason": "string",
    "created_at": "2026-11-02T09:30:00Z",
    "screens": [
      {
        "screen_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
        "screen_name": "string",
        "pricing_model": "cpm",
        "plays": 0,
        "max_plays_per_day": 0,
        "slots": 0,
        "price_minor": 0,
        "owner_status": "string"
      }
    ],
    "creatives": [
      {
        "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
        "kind": "image",
        "mime": "string",
        "size_bytes": 0,
        "width": 0,
        "height": 0,
        "duration_seconds": 0,
        "file_name": "string",
        "created_at": "2026-11-02T09:30:00Z"
      }
    ]
  }
}
patch/campaigns/{id}

Change a draft or rejected campaign

Write key. Only the fields sent change.

Klíč pro zápis

Parametry

NázevTypPopis
idv cestě · povinnýstring (uuid)

Tělo požadavku

PoleTypPopis
namepovinnýstring
objectivestring | null
categoryretail | food | automotive | finance | health | beauty | travel | entertainment | real_estate | education | services | public | alcohol | gambling | politics | other | null
starts_onstring (date) | null
ends_onstring (date) | null
spot_seconds5 | 10 | 15 | 20 | 30 | 45 | 60

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/campaigns/{id}" \
  -H "Authorization: Bearer dh_…" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","objective":"string","category":"retail","starts_on":"2026-11-02","ends_on":"2026-11-02","spot_seconds":15}'
Příklad těla
{
  "name": "string",
  "objective": "string",
  "category": "retail",
  "starts_on": "2026-11-02",
  "ends_on": "2026-11-02",
  "spot_seconds": 15
}
Odpověď 200
{
  "data": {
    "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
    "name": "string",
    "status": "draft",
    "objective": "string",
    "category": "string",
    "starts_on": "2026-11-02",
    "ends_on": "2026-11-02",
    "spot_seconds": 0,
    "total": {
      "currency": "CZK",
      "amount_minor": 0
    },
    "submitted_at": "2026-11-02T09:30:00Z",
    "reviewed_at": "2026-11-02T09:30:00Z",
    "rejection_reason": "string",
    "created_at": "2026-11-02T09:30:00Z",
    "screens": [
      {
        "screen_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
        "screen_name": "string",
        "pricing_model": "cpm",
        "plays": 0,
        "max_plays_per_day": 0,
        "slots": 0,
        "price_minor": 0,
        "owner_status": "string"
      }
    ],
    "creatives": [
      {
        "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
        "kind": "image",
        "mime": "string",
        "size_bytes": 0,
        "width": 0,
        "height": 0,
        "duration_seconds": 0,
        "file_name": "string",
        "created_at": "2026-11-02T09:30:00Z"
      }
    ]
  }
}
put/campaigns/{id}/screens/{screenId}

Book a screen or change its plan

Write key. Screens from GET /marketplace/screens. Per play (cpm) or slots per day (slot), as the screen offers.

Klíč pro zápis

Parametry

NázevTypPopis
idv cestě · povinnýstring (uuid)
screenIdv cestě · povinnýstring (uuid)

Tělo požadavku

PoleTypPopis
pricing_modelpovinnýcpm | slot
playsinteger
max_plays_per_dayinteger | null
slotsinteger

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 PUT "https://admin.doohub.online/api/v1/campaigns/{id}/screens/{screenId}" \
  -H "Authorization: Bearer dh_…" \
  -H "Content-Type: application/json" \
  -d '{"pricing_model":"cpm","plays":100,"max_plays_per_day":1}'
Příklad těla
{
  "pricing_model": "cpm",
  "plays": 100,
  "max_plays_per_day": 1
}
Odpověď 200
{
  "data": {
    "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
    "name": "string",
    "status": "draft",
    "objective": "string",
    "category": "string",
    "starts_on": "2026-11-02",
    "ends_on": "2026-11-02",
    "spot_seconds": 0,
    "total": {
      "currency": "CZK",
      "amount_minor": 0
    },
    "submitted_at": "2026-11-02T09:30:00Z",
    "reviewed_at": "2026-11-02T09:30:00Z",
    "rejection_reason": "string",
    "created_at": "2026-11-02T09:30:00Z",
    "screens": [
      {
        "screen_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
        "screen_name": "string",
        "pricing_model": "cpm",
        "plays": 0,
        "max_plays_per_day": 0,
        "slots": 0,
        "price_minor": 0,
        "owner_status": "string"
      }
    ],
    "creatives": [
      {
        "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
        "kind": "image",
        "mime": "string",
        "size_bytes": 0,
        "width": 0,
        "height": 0,
        "duration_seconds": 0,
        "file_name": "string",
        "created_at": "2026-11-02T09:30:00Z"
      }
    ]
  }
}
delete/campaigns/{id}/screens/{screenId}

Remove a booked screen

Klíč pro zápis

Parametry

NázevTypPopis
idv cestě · povinnýstring (uuid)
screenIdv 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/campaigns/{id}/screens/{screenId}" \
  -H "Authorization: Bearer dh_…"
Odpověď 204
(bez obsahu)
post/campaigns/{id}/creatives/uploads

Get an upload URL for a creative

Write key. Then PUT the file to upload_url with the returned headers (within 2 hours) and add it with POST /campaigns/{id}/creatives. JPEG, PNG, WebP up to 10 MB, MP4 up to 200 MB.

Klíč pro zápis

Parametry

NázevTypPopis
idv cestě · povinnýstring (uuid)

Tělo požadavku

PoleTypPopis
mimepovinnýimage/jpeg | image/png | image/webp | video/mp4
sizepovinnýintegerBytes.
file_namestring

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/campaigns/{id}/creatives/uploads" \
  -H "Authorization: Bearer dh_…" \
  -H "Content-Type: application/json" \
  -d '{"mime":"image/jpeg","size":0,"file_name":"string"}'
Příklad těla
{
  "mime": "image/jpeg",
  "size": 0,
  "file_name": "string"
}
Odpověď 201
{
  "data": {
    "path": "string",
    "upload_url": "https://example.com/doohub",
    "method": "PUT",
    "headers": {},
    "expires_in": 0
  }
}
post/campaigns/{id}/creatives

Add an uploaded creative

Write key. Type and size are read from the uploaded file; videos need duration_seconds.

Klíč pro zápis

Parametry

NázevTypPopis
idv cestě · povinnýstring (uuid)

Tělo požadavku

PoleTypPopis
pathpovinnýstringFrom the upload.
widthinteger | null
heightinteger | null
duration_secondsnumber | nullRequired for videos; at most spot_seconds.
file_namestring | 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/campaigns/{id}/creatives" \
  -H "Authorization: Bearer dh_…" \
  -H "Content-Type: application/json" \
  -d '{"path":"string","width":0,"height":0,"duration_seconds":0,"file_name":"string"}'
Příklad těla
{
  "path": "string",
  "width": 0,
  "height": 0,
  "duration_seconds": 0,
  "file_name": "string"
}
Odpověď 201
{
  "data": {
    "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
    "kind": "image",
    "mime": "string",
    "size_bytes": 0,
    "width": 0,
    "height": 0,
    "duration_seconds": 0,
    "file_name": "string",
    "created_at": "2026-11-02T09:30:00Z"
  }
}
delete/campaigns/{id}/creatives/{creativeId}

Remove a creative

Klíč pro zápis

Parametry

NázevTypPopis
idv cestě · povinnýstring (uuid)
creativeIdv 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/campaigns/{id}/creatives/{creativeId}" \
  -H "Authorization: Bearer dh_…"
Odpověď 204
(bez obsahu)
post/campaigns/{id}/submit

Submit the campaign for review

Write key. Checks dates, screens, creatives, capacity and credit like the portal, fixes the prices and reserves the credit; then the platform reviews the campaign and the screen owners confirm it.

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/campaigns/{id}/submit" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "data": {
    "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
    "name": "string",
    "status": "draft",
    "objective": "string",
    "category": "string",
    "starts_on": "2026-11-02",
    "ends_on": "2026-11-02",
    "spot_seconds": 0,
    "total": {
      "currency": "CZK",
      "amount_minor": 0
    },
    "submitted_at": "2026-11-02T09:30:00Z",
    "reviewed_at": "2026-11-02T09:30:00Z",
    "rejection_reason": "string",
    "created_at": "2026-11-02T09:30:00Z",
    "screens": [
      {
        "screen_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
        "screen_name": "string",
        "pricing_model": "cpm",
        "plays": 0,
        "max_plays_per_day": 0,
        "slots": 0,
        "price_minor": 0,
        "owner_status": "string"
      }
    ],
    "creatives": [
      {
        "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
        "kind": "image",
        "mime": "string",
        "size_bytes": 0,
        "width": 0,
        "height": 0,
        "duration_seconds": 0,
        "file_name": "string",
        "created_at": "2026-11-02T09:30:00Z"
      }
    ]
  }
}
get/creatives

Creatives of the account's campaigns

With the campaign, its review state (a creative is reviewed with its campaign) and, for Studio designs, whether it plays as a live scene. Upload under /campaigns/{id}/creatives.

Jakýkoli klíč

Parametry

NázevTypPopis
campaign_idv dotazustring (uuid)
kindv dotazuimage | video | html
limitv dotazuinteger
offsetv dotazuinteger

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/creatives" \
  -H "Authorization: Bearer dh_…"
Odpověď 200
{
  "data": [
    {
      "id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
      "campaign_id": "3f2b8c1e-5d4a-4c7e-9b61-2a8e0f6d1c47",
      "campaign": {
        "name": "string",
        "status": "string"
      },
      "review": "not_submitted",
      "kind": "image",
      "mime": "string",
      "size_bytes": 0,
      "resolution": {
        "width": 0,
        "height": 0
      },
      "duration_seconds": 0,
      "file_name": "string",
      "studio": {
        "design_id": "string",
        "live_scene": false
      },
      "created_at": "2026-11-02T09:30:00Z"
    }
  ],
  "meta": {
    "total": 0,
    "limit": 0,
    "offset": 0
  }
}

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.