Issue
POST
/api/v1/api-keys
const url = 'https://example.com/api/v1/api-keys';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","superuser":false}'};
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/v1/api-keys \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "superuser": false }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
IssueAPIKeyRequest
object
name
required
Name
string
superuser
Superuser
boolean
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
IssuedAPIKey
object
id
required
Id
string
token
required
Token
string
Examplegenerated
{ "id": "example", "token": "example"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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": {} } ]}