Create My Api Key
POST
/auth/api-keys/
const url = 'https://example.com/auth/api-keys/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/auth/api-keys/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example" }'Create an API key for the current user.
The raw key is returned only in this response and cannot be retrieved again.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
ApiKeyCreateRequest
object
name
required
Name
Human-readable label for the API key
string
Example generated
{ "name": "example"}Responses
Section titled “ Responses ”Successful Response
Media type application/json
ApiKeyCreateResponse
object
created_at
required
Created At
string format: date-time
fingerprint
required
Fingerprint
Non-secret key identifier (prefix and last four characters)
string
id
required
Id
string format: uuid
key
required
Key
The API key secret (shown only once)
string
name
required
Name
string
Example generated
{ "created_at": "2026-04-15T12:00:00Z", "fingerprint": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "key": "example", "name": "example"}Bad request — invalid query parameters or payload
Media type application/problem+json
Unauthorized — missing or invalid credentials
Media type application/problem+json
Forbidden — caller lacks access to this resource
Media type application/problem+json
Not found
Media type application/problem+json
Validation error
Media type application/problem+json
Too many requests — retry after the advertised interval
Media type application/problem+json
Headers
Section titled “Headers ” Retry-After
integer
Seconds until the request may be retried
Internal server error
Media type application/problem+json
Service unavailable — the database could not serve the request
Media type application/problem+json