Skip to content

Create an API key (the secret is returned exactly once)

POST
/v1/api-keys
curl --request POST \
--url https://api.vocapable.com/v1/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "mode": "live", "scopes": [ "example" ], "name": "example", "expires_at": "2026-04-15T12:00:00Z" }'
Media typeapplication/json
ApiKeyCreateRequest
object
mode
Mode
string
default: test
Allowed values: live test
scopes
required
Scopes
Array<string>
>= 1 items
name
Any of:
string
>= 1 characters <= 120 characters
expires_at
Any of:
string format: date-time

Successful Response

Media typeapplication/json
ApiKeyCreateResponse

Returned once at creation - secret is unrecoverable afterwards.

object
id
required
Id
string
name
Any of:
string
display_prefix
required
Display Prefix
string
mode
required
Mode
string
Allowed values: live test
scopes
required
Scopes
Array<string>
created_at
required
Created At
string format: date-time
expires_at
Any of:
string format: date-time
revoked_at
Any of:
string format: date-time
secret
required
Secret
string
Example
{
"mode": "live"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}