Body Required
The request to create the API key
-
API key description. Useful if there are multiple keys
-
expiration string
The optional expiration for the API key, provided as a duration (ex: '1d', '3h')
POST /users/auth/keys
curl \
-X POST https://{{hostname}}/api/v1/users/auth/keys \
-d '{"description":"string","expiration":"string"}'
Request examples
{
"description": "string",
"expiration": "string"
}
Response examples (201)
{
"id": "string",
"user_id": "string",
"organization_id": "string",
"description": "string",
"key": "string",
"creation_date": "2024-05-04T09:42:00+00:00",
"expiration_date": "2024-05-04T09:42:00+00:00"
}
Response examples (400)
# Headers
x-cloud-error-codes: api_keys.invalid_input
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}