Aggregator API
An authorized aggregator such as Pigmo can register each new casino as an independent OrbiSportbook client. The workflow is register → install wallet secrets → validate and activate → embed. Once the aggregator has automatic activation permission, individual clients do not need manual approval.
Download the OpenAPI 3.1 contract
One-time partner authorization
Section titled “One-time partner authorization”Open Aggregators in the platform Admin. Registration starts disabled. An MFA-authenticated platform administrator authorizes the partner directly. A second administrator is not required for aggregator authorization or key issuance. The policy specifies client quota, currencies, jurisdiction profiles, territories, exact HTTPS wallet origins, automatic activation permission, an approved agreement reference and an expiration within five years.
Issue a scoped aggregator key after authorization. It is displayed once to the issuing administrator. Keys expire within one year. Its expiry cannot exceed the authorization expiry. Store it only in the partner backend’s secret vault. Never distribute it to a casino browser, iframe, public deployment configuration or logs.
| Scope | Capability |
|---|---|
clients:read |
List and read owned clients |
clients:create |
Provision clients and their two environments |
clients:activate |
Validate wallets and activate clients |
credentials:rotate |
Replace integration keys for one client environment |
clients:update |
Change a client’s legal name, brand name and embed origins (update a client) |
themes:read |
Read a client’s published theme and its history (theme API) |
themes:write |
Publish a client’s theme and roll back (theme API) |
assets:write |
Upload a client’s logo and favicon (theme API) |
bets:read |
Read a client’s bets with their sporting content (bets and GGR) |
reports:read |
Read a client’s daily GGR report (bets and GGR) |
shares:write |
Create a client’s booking codes with the brand’s link and each affiliate’s ref (booking codes) |
shares:read |
Read a client’s booking codes and their results (booking codes) |
limits:read |
Read a client’s bet limits (bet limits) |
limits:write |
Replace a client’s bet limits (bet limits) |
A key keeps the scopes it was issued with: keys issued before themes:read, themes:write, assets:write and clients:update existed need a new key to use the theme API; the same goes for bets:read and reports:read. shares:write and shares:read were added to every key in use when they were introduced (2026-11-26).
Authentication and retries
Section titled “Authentication and retries”Base URL: https://api.orbisportbook.com/api/v1/aggregator.
Use Authorization: Bearer $AGGREGATOR_API_KEY. This server-to-server API does not use player login, staff cookies or X-Tenant-ID. Requests carrying Origin are rejected.
Every POST requires an Idempotency-Key containing 8–128 letters, digits, _, ., :, or -. Persist one key per operation and retry with the same body and API credential. Do not generate a new key for every attempt.
The encrypted original response can be replayed for 24 hours, with Idempotency-Replayed: true. A different body or API credential, or an expired response, produces 409. The request record remains to prevent an old retry from executing again. externalId is also unique within the aggregator. After expiry or conflict, read the client state and recover credentials from your vault before resuming; do not create another client to work around the response.
Limits: 64 KiB JSON bodies, 120 requests per minute per aggregator across its keys, and 100 clients per page. 429 responses include Retry-After: 60.
1. Register the casino
Section titled “1. Register the casino”Wallet origins must be explicitly authorized. Production and sandbox must have different base URLs backed by separate balances. Wallet calls identify players through playerId; a tenant header is not a substitute for wallet environment isolation.
curl --fail-with-body https://api.orbisportbook.com/api/v1/aggregator/clients \ -H "Authorization: Bearer $AGGREGATOR_API_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: casino-42-provision-v1' \ -d '{ "externalId": "casino-42", "name": "Casino 42", "legalName": "Casino 42 Ltd", "brandName": "Casino 42", "currency": "USD", "currencies": ["USD", "EUR"], "limitsByCurrency": { "EUR": {"minStake": 100, "maxStake": 100000, "maxPayout": 5000000, "maxSelections": 20} }, "jurisdiction": "ROW", "locale": "en", "territories": ["CW"], "embedOrigins": ["https://casino42.example"], "productionWalletUrl": "https://wallet.partner.example/casino-42/production", "sandboxWalletUrl": "https://wallet.partner.example/casino-42/sandbox", "reason": "Casino deployment provisioning" }'legalName and embedOrigins are optional. Without legalName the company name is used. Without embedOrigins, any site may frame the casino’s sportsbook; list the casino’s sites (up to 20) to restrict it. They can also be set later in the back office (Integration).
201 response (illustrative values):
{ "id": "acl_generated", "externalId": "casino-42", "status": "suspended", "nextAction": "install_wallet_secrets_then_activate", "credentialsReplaySeconds": 86400, "production": {"tenantId":"ob_generated","walletSecret":"whsec_REDACTED_PRODUCTION"}, "sandbox": {"tenantId":"ob_generated-sandbox","walletSecret":"whsec_REDACTED_SANDBOX"}}currency is the default currency. currencies lists every currency players
may hold a wallet in (default [currency]; the default is always included).
limitsByCurrency holds the bet limits of each currency other than the
default, keyed by currency code, in that currency’s minor units; it is required
for each of them, and limits are never converted. Every currency must be a
registry code within your authorization
policy’s currencies (otherwise 403); a BR client is BRL only. Both
environments get the same currencies. The client record (GET /clients/{id})
returns currency and currencies.
Internal IDs are server-generated; this API cannot claim an existing tenant. Save the client ID, environment tenant IDs and wallet secrets. Install each secret only in its respective wallet. Both environments initially remain suspended without usable integration API keys.
Implement all four wallet endpoints at each base URL. /balance must answer for every enabled currency: a nonnegative integer balance in that currency’s minor units, and the requested currency. Reject invalid HMAC signatures with 401 or 403. Staging and production require public HTTPS on port 443 with a valid certificate. Private networks, cloud metadata, environment proxies and redirects are blocked during validation and subsequent financial calls. Only development allows HTTP loopback.
New clients start with cash-out and live betting enabled in both environments; bet builder, system bets, bonuses and early payout stay off until enabled in the back office.
2. Validate and activate
Section titled “2. Validate and activate”Create a validation player in each of your wallet environments. OrbiSportbook only checks those players’ balances; this step does not create accounts or perform a debit, credit or rollback.
curl --fail-with-body \ "https://api.orbisportbook.com/api/v1/aggregator/clients/$CLIENT_ID/activate" \ -H "Authorization: Bearer $AGGREGATOR_API_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: casino-42-activate-v1' \ -d '{"productionPlayerId":"validation-prod-42","sandboxPlayerId":"validation-sandbox-42","reason":"Validate deployed integration"}'Activation sends a signed POST /balance (with currency and decimals) once per enabled currency, to both the sandbox and the production wallet, plus the same request with an invalid signature. Each must return a nonnegative integer balance in the requested currency and reject the invalid signature; a wallet that only answers the default currency would refuse every session in the others. The service rechecks authorization, credential validity and integration configuration before activating. Revocation or configuration changes during the checks prevent activation and credential issuance. On the hosted production deployment (api.orbisportbook.com), which runs no integration sandboxes, activation probes and activates only the production tenant: sandboxPlayerId is optional and ignored, the sandbox wallet is not called, the sandbox tenant stays suspended, and the response has "sandbox": null. Validate your integration in production with small stakes.
200 response:
{ "id": "acl_generated", "status": "active", "credentialsReplaySeconds": 86400, "production": {"tenantId":"ob_generated","environment":"production","keyId":"key_generated_prod","integrationApiKey":"bki_production_REDACTED"}, "sandbox": {"tenantId":"ob_generated-sandbox","environment":"sandbox","keyId":"key_generated_test","integrationApiKey":"bki_sandbox_REDACTED"}}Store each environment’s integration key separately. Use it as X-API-Key with the corresponding tenantId to create player sessions. Deliver only a launch token to the embedded browser.
This is technical activation under a pre-approved agreement, not certification of a license, data rights or complete financial homologation. Operator responsibilities and the go-live requirements still apply. A client subsequently suspended by the platform cannot reactivate itself through this endpoint.
Read and rotate
Section titled “Read and rotate”| Method and path | Result |
|---|---|
GET /clients?limit=50&cursor=... |
Owned clients and nextCursor, without secrets |
GET /clients?externalId=casino-42 |
Find a casino by the partner’s identifier |
GET /clients/{id} |
Environment IDs, default currency, enabled currencies, jurisdiction and status, legalName, brandName, embedOrigins, previewOrigins, shareUrl and the ETag of those values, without secrets |
PATCH /clients/{id} |
Change legalName, brandName, embedOrigins, previewOrigins and shareUrl (update a client) |
POST /clients/{id}/credentials/rotate |
New integration key for the requested environment |
For rotation send {"environment":"production","reason":"Scheduled rotation"} and a new idempotency key. All previous integration keys for that environment are revoked in the same transaction. This does not rotate wallet signing secrets or existing player sessions. Coordinate wallet signing-secret changes through the administrative integration workflow.
Revoking an aggregator key blocks new requests and replay access using that key. Disabling the aggregator blocks its API access while preserving existing client integrations and owed wallet payments. Casino suspension and casino credential revocation are separate actions.
Update a client
Section titled “Update a client”PATCH /clients/{id} changes only five fields. Send the ones to change, a reason, an
Idempotency-Key and If-Match with the ETag from GET /clients/{id}:
curl --fail-with-body -X PATCH \ "https://api.orbisportbook.com/api/v1/aggregator/clients/$CLIENT_ID" \ -H "Authorization: Bearer $AGGREGATOR_API_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: casino-42-update-v1' \ -H 'If-Match: "3f1c9a2d5b7e4a60c8d1e2f3a4b5c6d7"' \ -d '{"legalName":"Casino 42 Limited","brandName":"Casino 42","embedOrigins":["https://www.casino42.example"],"reason":"Company renamed after the merger"}'{ "id": "acl_generated", "changed": true, "etag": "\"b1c2d3e4f5a60718293a4b5c6d7e8f90\"", "client": { "id": "acl_generated", "legalName": "Casino 42 Limited", "brandName": "Casino 42", "embedOrigins": ["https://www.casino42.example"], "…": "…" } }| Field | Rule |
|---|---|
legalName |
2–200 characters, no control characters. The company’s legal name |
brandName |
2–70 characters. Production gets it as is, the sandbox tenant with · Sandbox |
embedOrigins |
Up to 20 https://host[:port] origins (http only in development), no path, query, credentials or wildcard; duplicates are dropped. [] clears the list. The same validation as the back office. Both tenants get the same list |
previewOrigins |
The sites that may push a live theme into a preview session by postMessage (live preview). Same validation as embedOrigins; [] clears it. Sensitive: it does not change who may frame the sportsbook, but a listed site can restyle a preview session of this client |
shareUrl |
The brand page a code’s default link (/s/<code>) leads to, with {code} once and optionally {affiliate}, e.g. https://brand.com/sports?bet_code={code}&ref={affiliate}. https, at most 512 characters. "" goes back to the sportsbook’s share page. The back office’s validation; both tenants get the same value. Also accepted by POST /clients, so a new brand starts configured |
reason |
Required, 3–1000 characters. Kept in the audit trail |
- Only these five fields. The body is decoded strictly: a wallet URL, an integration
key, a wallet secret, a currency, the jurisdiction, the status or any other field is a
400, never ignored. Use the endpoints above for those. 428withoutIf-Match,412when the client changed since you read it (error.details.currentEtag),400for*or a weak tag.- Sending values equal to the current ones answers
changed: false: nothing is written or audited. - Open sportsbooks of both tenants reload their configuration after a change.
embedOriginsis the list the sportsbook’s configuration publishes (tenant.embedOrigins). For an operator integration such as an aggregator client, any site may frame the sportsbook (tenant.embedAnyOriginistrue), so the list is not what restricts framing; still, treat it as an access list.
Bets and GGR report
Section titled “Bets and GGR report”Read each casino’s bets with their sporting content, and the back office’s daily GGR report, to reconcile. These are reads: no Idempotency-Key. They read the client’s production environment; ?environment=sandbox reads the sandbox.
| Method and path | Scope | Result |
|---|---|---|
GET /clients/{id}/bets |
bets:read |
The client’s bets, newest first, and nextCursor |
GET /clients/{id}/bets/{betId} |
bets:read |
One bet; 404 when it is not this client’s |
GET /clients/{id}/reports/ggr?from=YYYY-MM-DD&to=YYYY-MM-DD |
reports:read |
GGR per UTC day and totals per currency |
GET /clients/{id}/bets filters:
| Parameter | Rule |
|---|---|
from, to |
UTC date YYYY-MM-DD (to includes the day) or an RFC 3339 instant. On the bet’s placement time. At most 366 days |
status |
open, settled (any final status), won, lost, void, cashed_out or cancelled |
externalPlayerId |
The player’s id at the casino (the wallet’s playerId) |
playerId |
The player’s OrbiSportbook id |
limit, cursor |
1 to 100 (default 50). For the next page send the nextCursor you got; empty is the last page |
{ "bets": [{ "id": "bet_01H…", "ref": "OB-7KQ2", "playerId": "pl_…", "externalPlayerId": "casino-player-1", "type": "multiple", "betType": "multiple", "lines": 1, "currency": "BRL", "stake": 1000, "unitStake": 1000, "creditStake": 0, "totalOdds": 4.0, "potentialPayout": 4000, "payout": 4000, "cashoutAmount": 0, "status": "won", "live": false, "placedAt": "2026-11-10T18:00:00Z", "settledAt": "2026-11-10T20:00:00Z", "selections": [{ "sportId": "soccer", "competitionId": "…", "competitionName": "Brasileirão Série A", "eventId": "…", "eventName": "Flamengo x Palmeiras", "eventStart": "2026-11-10T19:00:00Z", "marketId": "…", "marketName": "Match result", "outcomeId": "…", "outcomeName": "Flamengo", "odds": 2.0, "result": "won", "live": false }] }], "nextCursor": "bet_01H…"}- Amounts in cents of
currency; decimal odds. typeissingle,multipleorsystem;betTypeis the exact type (trixie,doubles,lucky15… are systems, withsystemSizeandlines).totalOddsisnullfor systems.outcomeNameis the pick. A Bet Builder haskind: "bet_builder"and its legs inlegs.competitionNamefalls back tocompetitionIdonce the event has left the catalogue.
GET /clients/{id}/reports/ggr returns the rows of Reports → Revenue & activity by dimension (dimension Day, the brand’s scope): days with date, currency, bets, turnover, ggr, deductions, ngr and hold, and totals per currency. Movement GGR in UTC: stakes accepted that day minus postings made that day; deductions are booked on the first day of the month. At most 366 days per query. Currencies are never added together.
Booking codes (automated shared bets)
Section titled “Booking codes (automated shared bets)”The aggregator’s server creates ready-made bets for its clients (tips, signals, affiliate
campaigns) and gets the link on the brand’s own page back, with each affiliate’s ref and
parameters. It is the same code as the sportsbook’s Share button (same quote, up to 20
selections, 30 days) and POST /integration/shares: it places no bet
and moves no money.
| Endpoint | Scope | Returns |
|---|---|---|
POST /clients/{id}/shares |
shares:write |
Creates the code (or returns the same code for the same bet and affiliate) and its links |
GET /clients/{id}/shares/{code} |
shares:read |
One code, its selections and results (opens, slip loads, bets, players, turnover and GGR per currency), without counting an open; also once expired (expired: true) |
GET /clients/{id}/shares?from=&to=&affiliateId=&limit= |
shares:read |
Codes created in the window (default: the last 30 days; at most 366), most opened first, with the same results. An empty affiliateId= lists those without an affiliate |
Reads take ?environment=sandbox; on creation environment goes in the body. The client
must be active in that environment (409 before activation).
curl --fail-with-body https://api.orbisportbook.com/api/v1/aggregator/clients/$CLIENT_ID/shares \ -H "Authorization: Bearer $AGGREGATOR_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "type": "multiple", "selections": [{"outcomeId": "ev_oo_123/1x2/home"}, {"outcomeId": "ev_oo_456/1x2/away"}], "hostUrl": "https://brand.com/sports", "shareParams": {"ref": "affiliate123", "utm_source": "telegram", "utm_campaign": "round38"} }'{ "share": { "code": "K7M3Q9XT", "type": "multiple", "totalOdds": 3.4, "selections": ["…"], "expiresAt": "2026-12-26T12:00:00Z", "url": "https://api.orbisportbook.com/s/K7M3Q9XT?ref=affiliate123&utm_source=telegram&utm_campaign=round38" }, "links": { "default": "https://api.orbisportbook.com/s/K7M3Q9XT?ref=affiliate123&utm_source=telegram&utm_campaign=round38", "host": "https://brand.com/sports?bet_code=K7M3Q9XT&ref=affiliate123&utm_source=telegram&utm_campaign=round38" }, "affiliateId": "affiliate123", "shareParams": { "ref": "affiliate123", "utm_source": "telegram", "utm_campaign": "round38" }}| Field | Rule |
|---|---|
type, systemSize, eachWay, selections |
As on the slip: selections with outcomeId (the ids of GET /api/v1/events/{eventId}), or a Bet Builder (kind: "bet_builder", eventId, outcomeIds). Settled or suspended selections are dropped; with none left, 400 |
hostUrl |
Optional. The brand page that mounts the sportsbook: links.host is <hostUrl>?bet_code=<code>&<params>. https, no credentials, on one of the client’s embedOrigins or its shareUrl’s site (any site when it has neither). The hostUrl’s own private parameters are removed |
shareParams |
Optional. Public tracking parameters (ref, utm_*, experiment, variant…), in the order sent, on links.default and links.host. The rules of the SDK’s shareParams: private keys and values are dropped without an error; the response shows those kept |
affiliateId |
Optional (1–64 of A-Za-z0-9_.:@-). The affiliate the code is credited to: it fills the shareUrl’s {affiliate} and groups the report. Without it, shareParams.ref (when a valid id) is used |
environment |
production (default) or sandbox |
links.defaultshows the preview card in chat apps and leads to the client’sshareUrlwith the same parameters (or the sportsbook’s share page).links.hostopens your page directly: the SDK readsbet_codeand opens the bet at today’s odds.- The same bet for the same affiliate returns the same code while it is valid (30 days): no
Idempotency-Key, and repeating the call is safe. Different affiliates get different codes, each with its own results. - Every code created is audited (
share.created_by_aggregator, with the key used). It counts toward the aggregator’s 120 requests per minute.
Bet limits
Section titled “Bet limits”A casino manages its own bet limits from its back office: the same object the sportsbook’s office edits in the brand settings, for the brand’s default currency, in its minor units.
| Route | Scope | Answer |
|---|---|---|
GET /clients/{id}/limits?environment= |
limits:read |
{currency, limits, jurisdictionManaged, etag} and the ETag header |
PUT /clients/{id}/limits |
limits:write |
The same, after the change |
curl --fail-with-body -X PUT https://api.orbisportbook.com/api/v1/aggregator/clients/$CLIENT_ID/limits \ -H "Authorization: Bearer $AGGREGATOR_KEY" -H "Idempotency-Key: $(uuidgen)" \ -H 'If-Match: "<etag from GET>"' -H 'Content-Type: application/json' \ -d '{"reason":"Raise the Bet Builder cap for the derby","limits":{"minStake":100,"maxStake":500000,"maxPayout":5000000,"maxSelections":20,"liveDelayMs":5000,"maxBuilderEventPayout":15000000}}'PUTreplaces the whole object: read it, change what you need and send it back with theIf-Matchof the read (412 precondition_failedwithcurrentEtagwhen it changed since). A field left out returns to its default.- The office’s rules apply:
minStake≥ 1,maxStake≥minStake,maxPayout≥maxStakeandmaxStakeLive,maxSelections1–50,liveDelayMs0–30000,statsStakeFactor0–1, rules per sport and competition and league tiers as in the office. A refusal is400withdetails.field. maxBuilderEventPayoutcaps the potential payout of open Bet Builder bets on one match (0 = twicemaxPayout);maxLiabilitythe potential payout of open bets on one outcome (0 = none).- When the jurisdiction’s configuration sets the limits (
jurisdictionManaged: true), only the platform changes them: aPUTthat changes them is403withdetails.reason: "jurisdiction_layer". reason(3–500 characters) is required. Every change is audited (client.limits_updated) with the old and the new limits and the key used, and the brand’s open sportsbooks reload their configuration at once. Sending the limits already stored changes nothing (200).
Deployment job errors
Section titled “Deployment job errors”| HTTP | Handling |
|---|---|
400 |
Correct the body, wallet response, currency, signature or deployment configuration |
401 |
Expired/revoked key or disabled/expired authorization; stop and review access |
403 |
Scope, currency (any of currencies; details.currency names it), territory, origin or activation permission not granted |
404 |
Client does not exist or belongs to another aggregator |
412 / 428 |
Theme API only: If-Match is stale or missing (see theme API) |
409 |
Read state: duplicate, quota, incompatible retry, changed configuration or completed activation |
429 |
Respect Retry-After and repeat with the same idempotency key |
5xx / timeout |
Retry with backoff and the same key; do not assume the operation did not commit |
For Pigmo, persist a per-casino job with registered, wallet_secrets_installed, validated and integrated stages. Store redacted receipts in logs and secrets in the vault before advancing. Enable the sportsbook for players only after saving the integration keys and completing iframe testing.