Appearance
Admin API — Quick start
Five calls from an empty terminal to a changed setting. Run them from your backend (or a shell on it) — never from a browser.
bash
export OPERATOR_API=https://operator-api.oddyne.com/integration/v1
export KEY=sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # issued by Oddyne at onboarding1. Who am I?
bash
curl -s "$OPERATOR_API/sites" -H "Authorization: Bearer $KEY"json
{
"success": true,
"code": "ok",
"data": {
"client": "yourplatform",
"scopes": ["catalog.view", "risk.manage", "risk.view", "sportsbook.view"],
"sites": [
{ "siteId": "brand-a", "tenantId": "operator-a", "name": "Brand A",
"defaultCurrency": "EUR", "currencies": ["EUR"], "channels": ["web", "mobile"] }
]
}
}2. The dictionaries your UI renders
bash
curl -s "$OPERATOR_API/enums" -H "Authorization: Bearer $KEY"Ticket statuses, bet types, match and market statuses, risk reject codes, bet-delay levels and scopes — with their numeric codes where the API sends numbers. Cache it; it changes only with a release.
3. Find a tournament
bash
curl -s "$OPERATOR_API/catalog/sports?q=football" -H "Authorization: Bearer $KEY"
curl -s "$OPERATOR_API/catalog/categories?sportId=1" -H "Authorization: Bearer $KEY"
curl -s "$OPERATOR_API/catalog/tournaments?categoryId=31" -H "Authorization: Bearer $KEY"4. Read the site's risk groups
bash
curl -s "$OPERATOR_API/sites/brand-a/risk-groups" -H "Authorization: Bearer $KEY"5. Change something — with an actor
bash
curl -s -X PUT "$OPERATOR_API/sites/brand-a/bet-delays" \
-H "Authorization: Bearer $KEY" \
-H "X-Actor: [email protected]" \
-H "Content-Type: application/json" \
-d '{"level":"sport","entityId":1,"delayMs":5000}'Every write needs X-Actor; the sportsbook audit log records it next to the change.
Calling it from your backend
A minimal client: one place that adds the key, the actor and the JSON headers, and turns the envelope into a value or an error.
ts
const BASE = "https://operator-api.oddyne.com/integration/v1";
export class SportsbookAdminError extends Error {
constructor(public status: number, public code: string, message: string) { super(message); }
}
export async function sportsbook<T>(
method: "GET" | "POST" | "PUT" | "DELETE",
path: string,
opts: { actor?: string; body?: unknown; query?: Record<string, string | number> } = {},
): Promise<T> {
const url = new URL(BASE + path);
for (const [k, v] of Object.entries(opts.query ?? {})) url.searchParams.set(k, String(v));
const res = await fetch(url, {
method,
headers: {
Authorization: `Bearer ${process.env.SPORTSBOOK_ADMIN_KEY}`, // server env only
...(opts.actor ? { "X-Actor": opts.actor } : {}),
...(opts.body !== undefined ? { "Content-Type": "application/json" } : {}),
},
body: opts.body !== undefined ? JSON.stringify(opts.body) : undefined,
});
const env = await res.json();
if (!env.success) throw new SportsbookAdminError(res.status, env.code, env.error);
return env.data as T;
}
// In a request handler of YOUR admin backend, after YOUR auth and role checks:
// await sportsbook("PUT", `/sites/${siteId}/cashout`, { actor: admin.email, body: policy });Your admin frontend talks to your backend; your backend talks to this API. That keeps the key on your servers and lets your own role system decide who may press which button.