Skip to content

Create a new API key

POST
/v1/account/keys
curl --request POST \
--url https://oddslink.app/v1/account/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "label": "production server", "test": false }'

Signed-in website session only. The full secret is returned exactly once, in this response. We do not store the plaintext and cannot show it again. Key prefixes are ok_live_ for a normal key and ok_test_ for a test key, always clearly marked as test context.

Media typeapplication/json
object
label
required
string
>= 1 characters <= 64 characters
test

Create an ok_test_-prefixed key instead of a live one.

boolean
Examples
Examplecreate
{
"label": "production server",
"test": false
}

The new key, with its one-time secret.

Media typeapplication/json
object
id
required
string format: uuid
prefix
required

The key’s non-secret prefix, safe to display, for example ok_live_Q3v9Tb2K: the key’s own leading ok_live_ or ok_test_, plus its first 8 characters.

string
last_four
required

The key’s last 4 characters, safe to display alongside the prefix so you can tell two of your keys apart even when their prefixes match.

string
>= 4 characters <= 4 characters
label
required
string
test
required

True for a key created with test: true, always clearly marked as test context.

boolean
created_at
required
string format: date-time
last_used_at
required
string | null format: date-time
revoked_at
required
string | null format: date-time
key
required

The full secret. Returned only here, only once. We do not store the plaintext.

string
Examples
Examplecreated
{
"id": "8f14e45f-ceea-4c5b-9d1a-1a2b3c4d5e6f",
"prefix": "ok_live_Q3v9Tb2K",
"last_four": "Es9z",
"key": "ok_live_Q3v9Tb2KcWHFpOjQnLqLhrLoFMtNKwR7t7NTq-8Es9z",
"label": "production server",
"test": false,
"created_at": "2026-09-19T09:00:00Z",
"last_used_at": null,
"revoked_at": null
}
x-requests-used
integer

Requests used this billing period.

x-requests-remaining
integer

Requests remaining this billing period.

x-requests-last
integer

What this one call cost against the allowance (0 for a free call).

X-RateLimit-Limit
integer

This plan’s speed limit, in requests per second.

X-RateLimit-Remaining
integer

Requests left in the current one-second window.

X-RateLimit-Reset
integer

Seconds until the speed-limit window resets.

X-Request-Id
string

This request’s id, for support and for matching against error.request_id.

A parameter was malformed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
docs_url
required
string format: uri
request_id
required
string
current_plan

403 only: the plan on the presented key.

string
required_plan

403 only: the lowest plan that includes this request. For history, that depends on how long ago the fixture started as well as on the endpoint.

string
Example
{
"error": {
"code": "BAD_REQUEST",
"message": "commenceTimeFrom is not a valid ISO-8601 timestamp.",
"docs_url": "https://oddslink.app/docs/errors/#bad-request",
"request_id": "req_01hz8k3z9e2v6w1x"
}
}
x-requests-used
integer

Requests used this billing period.

x-requests-remaining
integer

Requests remaining this billing period.

x-requests-last
integer

What this one call cost against the allowance (0 for a free call).

X-RateLimit-Limit
integer

This plan’s speed limit, in requests per second.

X-RateLimit-Remaining
integer

Requests left in the current one-second window.

X-RateLimit-Reset
integer

Seconds until the speed-limit window resets.

X-Request-Id
string

This request’s id, for support and for matching against error.request_id.

The API key (or session) is missing or invalid.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
docs_url
required
string format: uri
request_id
required
string
current_plan

403 only: the plan on the presented key.

string
required_plan

403 only: the lowest plan that includes this request. For history, that depends on how long ago the fixture started as well as on the endpoint.

string
Examples

No X-API-Key header sent

{
"error": {
"code": "MISSING_KEY",
"message": "X-API-Key header is missing.",
"docs_url": "https://oddslink.app/docs/errors/#missing-key",
"request_id": "req_01hz8k4a1f3w7x2y"
}
}
x-requests-used
integer

Requests used this billing period.

x-requests-remaining
integer

Requests remaining this billing period.

x-requests-last
integer

What this one call cost against the allowance (0 for a free call).

X-RateLimit-Limit
integer

This plan’s speed limit, in requests per second.

X-RateLimit-Remaining
integer

Requests left in the current one-second window.

X-RateLimit-Reset
integer

Seconds until the speed-limit window resets.

X-Request-Id
string

This request’s id, for support and for matching against error.request_id.

The plan’s speed limit was exceeded; wait Retry-After seconds. A call that does not count against the allowance is never refused for a spent allowance.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
docs_url
required
string format: uri
request_id
required
string
current_plan

403 only: the plan on the presented key.

string
required_plan

403 only: the lowest plan that includes this request. For history, that depends on how long ago the fixture started as well as on the endpoint.

string
Example
{
"error": {
"code": "SPEED_LIMIT",
"message": "Speed limit exceeded: 10 requests/second on the Growth plan.",
"docs_url": "https://oddslink.app/docs/errors/#speed-limit",
"request_id": "req_01hz8k4f7m9c3d8f"
}
}
x-requests-used
integer

Requests used this billing period.

x-requests-remaining
integer

Requests remaining this billing period.

x-requests-last
integer

What this one call cost against the allowance (0 for a free call).

X-RateLimit-Limit
integer

This plan’s speed limit, in requests per second.

X-RateLimit-Remaining
integer

Requests left in the current one-second window.

X-RateLimit-Reset
integer

Seconds until the speed-limit window resets.

X-Request-Id
string

This request’s id, for support and for matching against error.request_id.

Retry-After
integer

Seconds to wait before retrying (429 SPEED_LIMIT only).

Something failed on our side.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
docs_url
required
string format: uri
request_id
required
string
current_plan

403 only: the plan on the presented key.

string
required_plan

403 only: the lowest plan that includes this request. For history, that depends on how long ago the fixture started as well as on the endpoint.

string
Example
{
"error": {
"code": "INTERNAL_ERROR",
"message": "Something went wrong on our side. It has been logged.",
"docs_url": "https://oddslink.app/docs/errors/#internal-error",
"request_id": "req_01hz8k4h8n0d4e9f"
}
}
x-requests-used
integer

Requests used this billing period.

x-requests-remaining
integer

Requests remaining this billing period.

x-requests-last
integer

What this one call cost against the allowance (0 for a free call).

X-RateLimit-Limit
integer

This plan’s speed limit, in requests per second.

X-RateLimit-Remaining
integer

Requests left in the current one-second window.

X-RateLimit-Reset
integer

Seconds until the speed-limit window resets.

X-Request-Id
string

This request’s id, for support and for matching against error.request_id.