Skip to main content
POST
/
api
/
v1
/
api_keys
Create API key (JWT only)
curl --request POST \
  --url https://api.callaro.ai/api/v1/api_keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "scopes": [
    "<string>"
  ]
}
'
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({name: '<string>', scopes: ['<string>']})
};

fetch('https://api.callaro.ai/api/v1/api_keys', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://api.callaro.ai/api/v1/api_keys"

payload = {
    "name": "<string>",
    "scopes": ["<string>"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "data": {},
  "message": "<string>",
  "meta": {},
  "request_id": "<string>"
}
{
  "error": "<string>",
  "error_code": "<string>",
  "request_id": "<string>",
  "details": {},
  "errors": [
    "<string>"
  ]
}

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
scopes
string[]

Optional explicit tenant API-key scopes. Omit to use defaults. Empty arrays are rejected.

Response

Created

data
object | null
message
string | null
meta
object | null
request_id
string | null