API keys

Create API key

Mint a key. The plaintext token is returned once, in this response, and never again. Not idempotent: every call mints a new key. At most 20 keys (created or rotated) per account in any 24 hours.

post/api_keys

Request

  • Base URL: https://arena-predictions.com/api/v1
  • URL: https://arena-predictions.com/api/v1/api_keys
  • Auth: one of:
    • API key in cookie sb-access-token
    • HTTP bearer

Request body

labelstring

Trimmed; an empty label becomes "Untitled key".

scopesstring[]

Defaults to records:read, portfolio:read and markets:read. trade:write is never a default: name it to place and cancel paper orders. While trading with keys is switched off it is refused (403 scope_not_available).

expiresInDaysinteger

Omit for a key that never expires.

Response

Created.

tokenstring required

The plaintext key. Shown once; only its hash is stored.

warningstring required

Changes

No recorded changes to this operation across all 1 revision of this API.