Create a campaign

Create a Draft campaign

POST/v1/campaigns

Request

A client sends this request signed with its credential. The example is signed with the test API key test-key-test-key and the test secret docs-example-signing, at the timestamp 1767225600 with the nonce docs-example-nonce-0001; see Authentication and signing.

Headers

  • Name
    X-Api-Key
    Type
    string, required
    Description

    The credential id. Sent together with X-Timestamp, X-Nonce and X-Signature.

  • Name
    X-Signature
    Type
    string, required
    Description

    Base64 HMAC-SHA256 of the method, the path with its query, X-Timestamp, X-Nonce and the lowercase hex SHA-256 of the raw body, joined by newlines. Compared in constant time; 30 seconds of tolerance; each nonce is used once.

  • Name
    X-Timestamp
    Type
    string, required
    Description

    Unix seconds; within 30 seconds of the receiver's clock. Matches ^[0-9]{1,12}$.

  • Name
    X-Nonce
    Type
    string, required
    Description

    Single use per credential, kept until the timestamp plus 30 seconds. At least 16 characters. At most 128 characters.

Body

  • Name
    code
    Type
    string, required
    Description

    Matches ^[A-Za-z0-9_.:-]{1,64}$.

  • Name
    currency
    Type
    string, required
    Description

    One of TRY, EUR, USD, USDT, TON, BTC, AED, AFN, ALL, AMD, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TTD, TWD, TZS, UAH, UGX, USN, UYI, UYU, UYW, UZS, VED, VES, VND, VUV, WST, XAF, XCD, XCG, XOF, XPF, YER, ZAR, ZMW, ZWG.

  • Name
    rounds_per_player
    Type
    integer, required
    Description

    At least 1. At most 2147483647.

  • Name
    begins_at
    Type
    string (date-time)
    Description

    When the rounds become playable; absent means at activation.

  • Name
    expires_at
    Type
    string (date-time), required
    Description
  • Name
    games
    Type
    object[], required
    Description

    At least 1 item.

  • Name
    games[].game_id
    Type
    string (uuid), required
    Description

    A UUID v7.

  • Name
    games[].bet_level
    Type
    integer, required
    Description

    The free round's bet in minor units of the campaign currency, one of the provider's levels. At least 1. At most 9007199254740991.

  • Name
    players
    Type
    string[]
    Description

    At most 500 items. No item repeats. Each item: at least 1 character. At most 44 characters.

Request

POST
/v1/campaigns
curl -X POST "https://aggregator.asteriks.casino/v1/campaigns" \
  -H "X-Api-Key: test-key-test-key" \
  -H "X-Timestamp: 1767225600" \
  -H "X-Nonce: docs-example-nonce-0001" \
  -H "X-Signature: mNdkEXZW0QNSRyAhp1z2EoMw23XtF1ozQPyi49H6/Co=" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "text",
  "currency": "EUR",
  "rounds_per_player": 1,
  "begins_at": "2026-10-13T12:00:00Z",
  "expires_at": "2026-10-20T12:00:00Z",
  "games": [
    {
      "game_id": "0199c5a0-0000-7000-8000-000000000002",
      "bet_level": 1
    }
  ],
  "players": [
    "text"
  ]
}'
201

Response

The answer is 201 with application/json.

  • Name
    id
    Type
    string (uuid), required
    Description

    A UUID v7.

  • Name
    code
    Type
    string, required
    Description

    The client's campaign code, unique per client. Matches ^[A-Za-z0-9_.:-]{1,64}$.

  • Name
    provider
    Type
    string, required
    Description

    One of drakon, cocktail, games360, betting_software, electrobets.

  • Name
    vendor
    Type
    string | null, required
    Description
  • Name
    currency
    Type
    string, required
    Description

    One of TRY, EUR, USD, USDT, TON, BTC, AED, AFN, ALL, AMD, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TTD, TWD, TZS, UAH, UGX, USN, UYI, UYU, UYW, UZS, VED, VES, VND, VUV, WST, XAF, XCD, XCG, XOF, XPF, YER, ZAR, ZMW, ZWG.

  • Name
    rounds_per_player
    Type
    integer, required
    Description

    At least 1. At most 2147483647.

  • Name
    begins_at
    Type
    string (date-time), required
    Description
  • Name
    expires_at
    Type
    string (date-time), required
    Description
  • Name
    status
    Type
    string, required
    Description

    One of draft, active, cancelled, expired.

  • Name
    games
    Type
    object[], required
    Description
  • Name
    games[].game_id
    Type
    string (uuid), required
    Description

    A UUID v7.

  • Name
    games[].bet_level
    Type
    integer, required
    Description

    The free round's bet in minor units of the campaign currency, one of the provider's levels. At least 1. At most 9007199254740991.

  • Name
    created_at
    Type
    string (date-time), required
    Description
  • Name
    cancelled_at
    Type
    string (date-time) | null, required
    Description
  • Name
    expired_at
    Type
    string (date-time) | null, required
    Description

Errors

Each error carries one of these codes in the error object of Errors.

  • Name
    MALFORMED_REQUEST
    Type
    400
    Description

    MALFORMED_REQUEST: a body, query or path value fails its schema.

  • Name
    UNAUTHORIZED
    Type
    401
    Description

    UNAUTHORIZED: a missing or wrong key, signature, timestamp or nonce.

  • Name
    CAMPAIGN_NOT_EDITABLE
    Type
    409
    Description

    The campaign's state, a campaign limit, the provider's refusal, or a campaign code reused with another body. A CAMPAIGN_LIMIT_REACHED body names the refusing limit in error.cap (CampaignCap).

  • Name
    CAMPAIGN_LIMIT_REACHED
    Type
    409
    Description

    The campaign's state, a campaign limit, the provider's refusal, or a campaign code reused with another body. A CAMPAIGN_LIMIT_REACHED body names the refusing limit in error.cap (CampaignCap).

  • Name
    CAMPAIGN_PROVIDER_REFUSED
    Type
    409
    Description

    The campaign's state, a campaign limit, the provider's refusal, or a campaign code reused with another body. A CAMPAIGN_LIMIT_REACHED body names the refusing limit in error.cap (CampaignCap).

  • Name
    CAMPAIGN_CODE_CONFLICT
    Type
    409
    Description

    The campaign's state, a campaign limit, the provider's refusal, or a campaign code reused with another body. A CAMPAIGN_LIMIT_REACHED body names the refusing limit in error.cap (CampaignCap).

  • Name
    CAMPAIGNS_NOT_SUPPORTED
    Type
    422
    Description

    A campaign feature the provider cannot serve, refused before any provider call.

  • Name
    CAMPAIGN_MULTIPLE_GAMES_NOT_SUPPORTED
    Type
    422
    Description

    A campaign feature the provider cannot serve, refused before any provider call.

  • Name
    CAMPAIGN_DEFERRED_START_NOT_SUPPORTED
    Type
    422
    Description

    A campaign feature the provider cannot serve, refused before any provider call.

  • Name
    CAMPAIGN_PLAYER_REMOVAL_NOT_SUPPORTED
    Type
    422
    Description

    A campaign feature the provider cannot serve, refused before any provider call.

  • Name
    CAMPAIGN_CANCEL_NOT_SUPPORTED
    Type
    422
    Description

    A campaign feature the provider cannot serve, refused before any provider call.

  • Name
    CAMPAIGN_CURRENCY_NOT_SUPPORTED
    Type
    422
    Description

    A campaign feature the provider cannot serve, refused before any provider call.

  • Name
    CAMPAIGN_MIXED_VENDORS_NOT_SUPPORTED
    Type
    422
    Description

    A campaign feature the provider cannot serve, refused before any provider call.

  • Name
    CAMPAIGN_BET_LEVEL_NOT_ALLOWED
    Type
    422
    Description

    A campaign feature the provider cannot serve, refused before any provider call.

  • Name
    CAMPAIGN_ROUNDS_NOT_ALLOWED
    Type
    422
    Description

    A campaign feature the provider cannot serve, refused before any provider call.

  • Name
    CAMPAIGN_GAME_NOT_ELIGIBLE
    Type
    422
    Description

    A campaign feature the provider cannot serve, refused before any provider call.

  • Name
    INTERNAL_ERROR
    Type
    502
    Description

    INTERNAL_ERROR: the provider failed to answer.

Response

{
  "id": "0199c5a0-0000-7000-8000-000000000002",
  "code": "text",
  "provider": "drakon",
  "vendor": "text",
  "currency": "EUR",
  "rounds_per_player": 1,
  "begins_at": "2026-10-13T12:00:00Z",
  "expires_at": "2026-10-20T12:00:00Z",
  "status": "draft",
  "games": [
    {
      "game_id": "0199c5a0-0000-7000-8000-000000000002",
      "bet_level": 1
    }
  ],
  "created_at": "2026-10-13T12:00:00Z",
  "cancelled_at": null,
  "expired_at": null
}

Was this page helpful?