Create My Api Key
POST
/auth/api-keys/
const url = 'https://example.com/api/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/api/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
id
required
Id
string format: uuid
key
required
Key
The API key secret (shown only once)
string
name
required
Name
string
created_at
required
Created At
string format: date-time
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "key": "example", "name": "example", "created_at": "2026-04-15T12:00:00Z"}Bad request — invalid query parameters or payload
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Unauthorized — missing or invalid credentials
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Forbidden — caller lacks access to this resource
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Not found
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Validation error
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}Internal server error
ProblemDetail
object
type
Type
string
title
required
Title
string
status
required
Status
integer
detail
required
Detail
string
Example
{ "type": "about:blank"}