Skip to main content

Create API Key

POST/api/v1/user/api-keys

Create a new API key for the user's selected organization.

cURL example

curl -X POST \
  'http://localhost:8000/api/v1/user/api-keys' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{}'

Parameters

NameLocationTypeDescription
authorizationheaderobject
X-API-Keyheaderobject

Request body

application/json
View schema
{
  "$ref": "#/components/schemas/CreateAPIKeyRequest"
}

Responses

200Successful Response
application/json
View schema
{
  "$ref": "#/components/schemas/CreateAPIKeyResponse"
}
404Not found
422Validation Error
application/json
View schema
{
  "$ref": "#/components/schemas/HTTPValidationError"
}