Skip to main content
POST
/
v1
/
sub-accounts
/
{id}
/
api-keys
Create sub-account API key
curl --request POST \
  --url https://api.zavu.dev/v1/sub-accounts/{id}/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Production Key",
  "environment": "live"
}
'
{
  "apiKey": {
    "id": "<string>",
    "key": "<string>",
    "name": "<string>",
    "environment": "live"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Sub-account ID.

Body

application/json
name
string
required
environment
enum<string>
default:live
Available options:
live,
test
permissions
string[]

Response

API key created. The full key is only returned once.

apiKey
object
required