Skip to main content
POST
/
v1
/
auth
/
api-keys
Create an API key
curl --request POST \
  --url http://127.0.0.1:8787/v1/auth/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "permissions": [],
  "metadata": {}
}
'
{
  "data": {
    "id": "<string>",
    "key": "<string>"
  },
  "error": null
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
Required string length: 1 - 120
permissions
enum<string>[]
required
Minimum array length: 1
Available options:
webhooks:read,
webhooks:write,
sessions:read,
sessions:write,
analytics:read
metadata
object

Response

API key created successfully.

data
object
required
error
null
required