Skip to content

API Keys

Agent-scoped API keys (chr_ak_*) let you limit access to a single agent’s calendars, events, availability, and iCal subscriptions.

POST /v1/keys
FieldTypeRequiredDescription
agent_idstringYesTarget agent ID (agt_*)
labelstringNoOptional label, 1-100 characters
Terminal window
curl -X POST https://api.chronary.ai/v1/keys \
-H "Authorization: Bearer chr_sk_your_org_key" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agt_a1b2c3d4",
"label": "Sales agent key"
}'
{
"id": "key_abc123",
"key": "chr_ak_0123456789ABCDEF",
"key_prefix": "chr_ak_0A1B2C3D",
"agent_id": "agt_a1b2c3d4",
"label": "Sales agent key",
"created_at": "2026-04-17T16:20:00.000Z"
}

The raw key is returned only once. Store it immediately.

StatusTypeCause
400validation_errorInvalid request body
403forbiddenAgent-scoped keys cannot manage org-level keys
404not_foundAgent not found

GET /v1/keys

No query parameters are required.

Terminal window
curl https://api.chronary.ai/v1/keys \
-H "Authorization: Bearer chr_sk_your_org_key"
{
"keys": [
{
"id": "key_abc123",
"key_prefix": "chr_ak_0A1B2C3D",
"agent_id": "agt_a1b2c3d4",
"label": "Sales agent key",
"created_at": "2026-04-17T16:20:00.000Z"
}
]
}

The raw secret value is not returned from list responses.

StatusTypeCause
403forbiddenAgent-scoped keys cannot manage org-level keys

DELETE /v1/keys/:id

Revokes the key immediately and returns 204 No Content.

Terminal window
curl -X DELETE https://api.chronary.ai/v1/keys/key_abc123 \
-H "Authorization: Bearer chr_sk_your_org_key"
StatusTypeCause
403forbiddenAgent-scoped keys cannot manage org-level keys
404not_foundScoped key not found