Skip to content

Availability API

Three endpoints for finding available time slots across Chronary calendars and authorized human-calendar sources. Occurrences of recurring events block slots like any other event — individually cancelled occurrences do not.

Returns available slots across all of an agent’s calendars.

GET /v1/agents/:id/availability
ParameterTypeRequiredDefaultDescription
startdatetimeYes—Start of time range (ISO 8601)
enddatetimeYes—End of time range (must be after start). The range is at most your plan’s date range
durationstringNo30m15m, 30m, 45m, 1h, or 2h
slot_durationstringNo30mDeprecated alias for duration. Still accepted; sending both with different values returns 400
include_busybooleanNofalseInclude busy slots in response
allow_stalebooleanNofalseReturn slots from usable stale human-calendar cache. Intended only for non-committing exploration
StatusTypeCause
400validation_errorDate range exceeds plan limit
404not_foundAgent not found
429quota_exceededMonthly availability-query limit reached (metric: "availability_queries")
Terminal window
curl "https://api.chronary.ai/v1/agents/agt_a1b2c3d4/availability?start=2026-04-07T09:00:00Z&end=2026-04-07T17:00:00Z&duration=30m" \
-H "Authorization: Bearer chr_sk_your_key_here"
{
"agents": ["agt_a1b2c3d4"],
"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-07T15:00:00Z", "end": "2026-04-07T15:30:00Z" }
],
"availability_state": "complete",
"sources": { "chronary": "current", "external": "current", "last_synced_at": "2026-04-07T08:58:00Z" },
"warnings": []
}

Same parameters, scoped to one calendar.

GET /v1/calendars/:id/availability
Terminal window
curl "https://api.chronary.ai/v1/calendars/cal_x1y2z3/availability?start=2026-04-07T09:00:00Z&end=2026-04-07T17:00:00Z" \
-H "Authorization: Bearer chr_sk_your_key_here"
StatusTypeCause
400validation_errorDate range exceeds plan limit
404not_foundCalendar not found
429quota_exceededMonthly availability-query limit reached (metric: "availability_queries")

The single-agent and single-calendar endpoints accept a start..end range up to your plan’s limit. A longer range returns 400 validation_error with the message Maximum <N> day range on your plan; split the query into shorter windows.

PlanMax date range
Free30 days
Developer30 days
Pro90 days
CustomCustom

Find time slots where multiple agents are all free.

GET /v1/availability
ParameterTypeRequiredDefaultDescription
agentsstringYes—Comma-separated agent IDs
startdatetimeYes—Start of time range (ISO 8601)
enddatetimeYes—End of time range
durationstringNo30m15m, 30m, 45m, 1h, or 2h
slot_durationstringNo30mDeprecated alias for duration. Still accepted; sending both with different values returns 400
calendarsstringNo—Comma-separated calendar IDs whose busy time also blocks slots, at most 50
include_busybooleanNofalseInclude busy slots
allow_stalebooleanNofalseReturn slots from usable stale human-calendar cache

All three endpoints return availability_state (complete, stale, partial, or unavailable), provider-neutral sources, and warnings. The default is fail-closed: if required external data is not current, slots is empty and warnings contains availability_incomplete. Only schedule from a complete response. MCP does not expose allow_stale.

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&duration=30m" \
-H "Authorization: Bearer chr_sk_your_key_here"

Cross-agent availability requires Developer or Pro; the free plan gets 403 plan_required.

PlanMax agents per queryMax date range
FreeNot available—
Developer10 agents30 days
Pro20 agents90 days
CustomCustomCustom
StatusTypeCause
400validation_errorToo many agents for your plan
400validation_errorDate range exceeds plan limit
400validation_errorMore than 50 calendars (param: "calendars")
403plan_requiredYour plan doesn’t include cross-agent availability (feature: "cross_calendar_availability")
404not_foundOne or more of the agents not found
429quota_exceededMonthly availability-query limit reached (metric: "availability_queries")

Availability rules let you pad events with buffer time and restrict free slots to working hours on a per-calendar basis. Rules are applied automatically to all three availability endpoints above — the engine expands each event by the configured buffers and marks time outside working hours as busy before computing free slots.

By default, calendars have no rules: buffers are 0, there are no working-hours restrictions, and every minute outside an event is considered free. Rules are stored per calendar, so a single agent can mix strict (business hours) and always-on calendars.

Upsert rules for a calendar. Any existing rules are replaced.

PUT /v1/calendars/:id/availability-rules
FieldTypeRequiredDefaultDescription
buffer_before_minutesintegerNo0Minutes of buffer before each event (0–120)
buffer_after_minutesintegerNo0Minutes of buffer after each event (0–120)
working_hoursobject | nullNonullPer-day working-hours map. null means no working-hours restriction
timezonestringNo"UTC"IANA timezone for working_hours (e.g. America/New_York). It must be a time zone name the API accepts (an IANA name such as America/New_York, or a UTC offset like +05:00); anything else (America/New York, GMT+5) returns 400 validation_error

working_hours is an object keyed by lowercase 3-letter weekday abbreviations. Each day is optional; days that are omitted are treated as entirely non-working.

Day keyValue
mon, tue, wed, thu, fri, sat, sun{ "start": "HH:MM", "end": "HH:MM" }

start and end are 24-hour local times in the configured timezone. end must be after start. At least one day must be present when working_hours is not null.

Terminal window
curl -X PUT https://api.chronary.ai/v1/calendars/cal_01H9X4M2P5R8T6V0/availability-rules \
-H "Authorization: Bearer chr_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"buffer_before_minutes": 15,
"buffer_after_minutes": 15,
"working_hours": {
"mon": { "start": "09:00", "end": "17:00" },
"tue": { "start": "09:00", "end": "17:00" },
"wed": { "start": "09:00", "end": "17:00" },
"thu": { "start": "09:00", "end": "17:00" },
"fri": { "start": "09:00", "end": "17:00" }
},
"timezone": "America/New_York"
}'
{
"id": "avr_01H9X4M2P5R8T6V0",
"calendar_id": "cal_01H9X4M2P5R8T6V0",
"buffer_before_minutes": 15,
"buffer_after_minutes": 15,
"working_hours": {
"mon": { "start": "09:00", "end": "17:00" },
"tue": { "start": "09:00", "end": "17:00" },
"wed": { "start": "09:00", "end": "17:00" },
"thu": { "start": "09:00", "end": "17:00" },
"fri": { "start": "09:00", "end": "17:00" }
},
"timezone": "America/New_York",
"created_at": "2026-04-07T12:00:00.000Z",
"updated_at": "2026-04-07T12:00:00.000Z"
}
StatusTypeCause
400validation_errorBuffer outside 0–120, end not after start, empty working_hours object, or a timezone the API does not accept
404not_foundCalendar not found
409agent_inactiveThe calendar belongs to a decommissioned agent and is read-only

GET /v1/calendars/:id/availability-rules

Returns the current rules for the calendar.

Terminal window
curl https://api.chronary.ai/v1/calendars/cal_01H9X4M2P5R8T6V0/availability-rules \
-H "Authorization: Bearer chr_sk_your_key_here"

Same shape as the PUT response above.

StatusTypeCause
404not_foundCalendar not found, or no rules set for this calendar

Removes buffers and working-hours restrictions. After deletion, the calendar reverts to the default “every minute is free unless blocked by an event” behavior.

DELETE /v1/calendars/:id/availability-rules
Terminal window
curl -X DELETE https://api.chronary.ai/v1/calendars/cal_01H9X4M2P5R8T6V0/availability-rules \
-H "Authorization: Bearer chr_sk_your_key_here"

Empty body.

StatusTypeCause
404not_foundCalendar not found, or no rules set for this calendar
409agent_inactiveThe calendar belongs to a decommissioned agent and is read-only