Outlap Docs
Open Outlap

Create an API key

Mint a club-scoped API key. The raw key is returned exactly once. Called with a signed-in club admin's session, not an API key.

POST …/timing-api-key-create/

Most people create keys in the app: see Create an API key. This endpoint is what the app calls, and it’s useful for admin tooling that already holds a signed-in club admin’s session.

Unlike every other endpoint, it authenticates with the user’s session token (a Supabase JWT) in the Authorization header, not with an API key. The caller must be an admin of the club.

Body

  • club_id string required
    The club or track to create the key for.
  • name string required
    A label so you can recognise the key later, such as “Race Control PC”.

Response

  • id string
    Key ID, used for revocation and audit.
  • name string
    The label you gave it.
  • key_prefix string
    First eight characters, shown in the key list.
  • created_at string
    ISO 8601 creation time.
  • key string
    The full key: olap_ followed by 48 hex characters. Shown only in this response.

New keys carry the timing:write and timing:read scopes.

Errors

StatuserrorCause
400club_id and name requiredA field is missing.
401unauthorizedNo valid user session in Authorization.
403must be a club adminThe signed-in user isn’t an admin of that club.
405method not allowedOnly POST is supported.
esc
↑↓ to navigate ↵ to open esc to close