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

| Field | Type | Required | Description | |-------|------|----------|-------------| | agent_id | string | Yes | Target agent ID (agt_*) | | label | string | No | Optional 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.

| Status | Type | Cause | |--------|------|-------| | 400 | validation_error | Invalid request body | | 403 | forbidden | Agent-scoped keys cannot manage org-level keys | | 404 | not_found | Agent 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.

| Status | Type | Cause | |--------|------|-------| | 403 | forbidden | Agent-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"

| Status | Type | Cause | |--------|------|-------| | 403 | forbidden | Agent-scoped keys cannot manage org-level keys | | 404 | not_found | Scoped key not found |