Skip to content

Create Key

POST
/v1/admin/api-keys
curl --request POST \
--url http://localhost:8080/v1/admin/api-keys \
--header 'Content-Type: application/json' \
--data '{ "user_id": "example", "name": "example" }'
Media type application/json
CreateKeyPayload
object
user_id
required
User Id
string
>= 1 characters
name
required
Name
string
>= 1 characters <= 128 characters /^[A-Za-z0-9 _\-.]+$/
Example generated
{
"user_id": "example",
"name": "example"
}

Successful Response

Media type application/json
Response Create Key V1 Admin Api Keys Post
object
key
additional properties
any
Example generated
{}

Validation Error

Media type application/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
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}