Skip to main content
POST
/
v1
/
keys
Create API key
curl --request POST \
  --url http://localhost:8080/v1/keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "production",
  "scopes": [
    "read",
    "write"
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "key_prefix": "<string>",
  "api_key": "<string>",
  "scopes": [
    "<string>"
  ],
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key with mk_ or rk_ prefix

Body

application/json
name
string
required
Example:

"production"

scopes
enum<string>[]
Available options:
read,
write,
admin
Example:
["read", "write"]

Response

201 - application/json

Key created

id
string<uuid>
name
string
key_prefix
string
api_key
string

Full key value — shown only once

scopes
string[]
created_at
string<date-time>