Skip to content

Availability

The availability engine finds open time slots by examining events across one or more calendars. It supports single-agent, single-calendar, and cross-agent queries.

EndpointScopeUse case
GET /v1/agents/:id/availabilityAll calendars for one agent”When is this agent free?”
GET /v1/calendars/:id/availabilitySingle calendar”When is this calendar free?”
GET /v1/availabilityMultiple agents”When are all these agents free?”

Returns available time slots across all of an agent’s calendars:

Terminal window
curl "https://api.chronary.ai/v1/agents/agt_a1b2c3d4/availability?start=2026-04-07T09:00:00Z&end=2026-04-07T17:00:00Z&slot_duration=30m" \
-H "Authorization: Bearer chr_sk_test_your_key_here"

Response:

{
"slots": [
{ "start": "2026-04-07T09:00:00Z", "end": "2026-04-07T09:30:00Z" },
{ "start": "2026-04-07T09:30:00Z", "end": "2026-04-07T10:00:00Z" },
{ "start": "2026-04-07T10:00:00Z", "end": "2026-04-07T10:30:00Z" },
{ "start": "2026-04-07T15:00:00Z", "end": "2026-04-07T15:30:00Z" }
]
}
ParameterTypeRequiredDescription
startdatetimeYesStart of the time range (ISO 8601)
enddatetimeYesEnd of the time range (must be after start)
slot_durationstringNo15m, 30m (default), 45m, 1h, or 2h
include_busybooleanNoInclude busy slots in response (default false)

Same parameters, scoped to one calendar:

Terminal window
curl "https://api.chronary.ai/v1/calendars/cal_x1y2z3/availability?start=2026-04-07T09:00:00Z&end=2026-04-07T17:00:00Z&slot_duration=1h" \
-H "Authorization: Bearer chr_sk_test_your_key_here"

Find time slots where multiple agents are all free:

Terminal window
curl "https://api.chronary.ai/v1/availability?agents=agt_a1b2c3d4,agt_e5f6g7h8&start=2026-04-07T09:00:00Z&end=2026-04-07T17:00:00Z&slot_duration=30m" \
-H "Authorization: Bearer chr_sk_test_your_key_here"

Additional parameters for cross-agent queries

Section titled “Additional parameters for cross-agent queries”
ParameterTypeDescription
agentsstringRequired. Comma-separated agent IDs
calendarsstringOptional. Comma-separated calendar IDs to narrow scope

Cross-agent availability has plan-based limits:

PlanMax agents per queryMax date range
Free530 days
Pro2090 days
Scale50365 days

Exceeding these limits returns 400 Bad Request.

  1. The engine collects all events from the relevant calendars in the requested time range
  2. Events with status confirmed or tentative block time slots
  3. Events with status cancelled do not block time
  4. Events imported via iCal subscriptions are also included
  5. The time range is divided into slots of the requested duration
  6. Slots that overlap with any blocking event are excluded (or marked busy if include_busy=true)