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_idstring requiredThe club or track to create the key for. -
namestring requiredA label so you can recognise the key later, such as “Race Control PC”.
Response
-
idstringKey ID, used for revocation and audit. -
namestringThe label you gave it. -
key_prefixstringFirst eight characters, shown in the key list. -
created_atstringISO 8601 creation time. -
keystringThe full key:olap_followed by 48 hex characters. Shown only in this response.
New keys carry the timing:write and timing:read scopes.
Errors
| Status | error | Cause |
|---|---|---|
400 | club_id and name required | A field is missing. |
401 | unauthorized | No valid user session in Authorization. |
403 | must be a club admin | The signed-in user isn’t an admin of that club. |
405 | method not allowed | Only POST is supported. |
Was this page helpful?
Reviewed · Contact support