Skip to content

Create API key

POST
/api/v1/auth/api-keys
curl --request POST \
--url https://app.ayna.com/api/v1/auth/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "expires_in_days": 1 }'

Create a new API key. The key value is only shown once.

Media typeapplication/json
APIKeyCreateRequest
object
name
required
Name

Name for the API key

string
>= 1 characters <= 100 characters
expires_in_days
Any of:
integer
>= 1 <= 365

Example generated

{
"name": "example",
"expires_in_days": 1
}

Created

Media typeapplication/json
Response
object
key
additional properties
any

Example generated

{}