Create a brand (sub-operator)
const url = 'https://api.aggregator.gg/v1/sub-operators';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"sub_operator_ref":"brand-01","display_name":"Lucky Spin"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.aggregator.gg/v1/sub-operators \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "sub_operator_ref": "brand-01", "display_name": "Lucky Spin" }'Platform accounts only. Create one brand under your platform, before any traffic reaches it.
Auto-provision still works - a launch or GET /v1/games carrying an
unseen sub_operator_ref mints the brand on the spot. This endpoint adds
the ability to do it deliberately, which matters in three cases:
- a platform running
require_sub_operator_refhas no lazy path at all, so every brand must exist before it is named; - creating a brand at launch time makes the first player pay the cold-path latency (mapping insert, settings seed, selection clone) - pre-creating moves that off the money path;
- a typo’d ref and a genuine new brand are indistinguishable to auto-provision. Here they are not: creation is a request you made.
Idempotent. An existing ref returns the same identity with 200 rather than a conflict - re-running your brand list on every deploy is a normal thing to do, and turning it into an error would push integrators toward ignoring errors.
The first brand a platform creates becomes its default: the brand a
request that omits sub_operator_ref resolves to. There is no reserved
default ref.
A new brand starts with the same games and providers your platform already has available, so its catalog is usable immediately.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The brand to create. Format: 1-32 characters of
[A-Za-z0-9_-], starting and ending alphanumeric; : is not
allowed. Matched case-insensitively - Brand-01 and
brand-01 are one brand, not two.
Missing, empty or malformed is a 400 (E6004). Refs are
validated and never silently repaired: a repaired typo would
mint a phantom brand and split its money across two
identities.
Example
brand-01Optional human label for the brand - what it is called in
your cabinet and in our admin views. It never identifies the
brand: sub_operator_ref does that, on every request.
Omitting the field leaves any existing name alone, so
re-running your brand list on deploy does not erase labels
someone set by hand. Sending it empty (or null) clears the
name. Longer than 120 characters is truncated, not refused -
a label is not worth failing a brand’s creation over.
Example
Lucky SpinResponses
Section titled “Responses”The brand exists and is yours. Returned whether it was created by this call or already present - see the idempotency note above.
object
The canonical (lower-cased, trimmed) ref.
Present only when the request carried display_name -
it reports what was stored, so a truncated or cleared
label is visible without a second call.
The brand’s internal identity - what its sessions, transactions and analytics are attributed to. Reported back so you can join our records to yours; it is not a parameter you ever send.
Example
{ "sub_operator_ref": "brand-01", "display_name": "Lucky Spin", "operator_user_id": "platform:brand-01"}Invalid or missing sub_operator_ref (E6004), or your platform is
at its brand cap (E6007).
object
object
Machine-parseable error code. See https://hub.aggregator.gg/error-reference/.
Correlation ID for support escalation.
object
Example
{ "error": { "code": "E0001" }}Missing, invalid, or revoked API key.
object
object
Machine-parseable error code. See https://hub.aggregator.gg/error-reference/.
Correlation ID for support escalation.
object
Example
{ "error": { "code": "E0001" }}This key is not a platform key (E6006). Brands exist only
under platform accounts; an operator key already identifies
a single operator.
object
object
Machine-parseable error code. See https://hub.aggregator.gg/error-reference/.
Correlation ID for support escalation.
object
Example
{ "error": { "code": "E0001" }}Your platform is not fully provisioned and owns no organization to
bill (E6009). Contact support.
object
object
Machine-parseable error code. See https://hub.aggregator.gg/error-reference/.
Correlation ID for support escalation.
object
Example
{ "error": { "code": "E0001" }}