Skip to content

Events

Events are the individual entries on a calendar — meetings, appointments, tasks, or any time-boxed item your agent needs to track.

By the end of this guide you will be able to create events on a calendar, list and filter them, query across an agent’s calendars, update event details, and delete events.

  • A Chronary account with an API key
  • At least one agent and calendar created (see the quickstart)
Terminal window
curl -X POST https://api.chronary.ai/v1/calendars/cal_x1y2z3/events \
-H "Authorization: Bearer chr_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Product demo with Globex Industries",
"start_time": "2026-04-10T15:00:00Z",
"end_time": "2026-04-10T16:00:00Z",
"description": "Walk through the new dashboard features and pricing tiers",
"status": "confirmed",
"metadata": {
"deal_id": "deal_9823",
"attendees": ["maria@globex.com", "james@globex.com"]
}
}'

You can also create all-day events by setting all_day: true. Send midnight on the first day as start_time and midnight after the last day as end_time (the end is exclusive). This two-day offsite covers 15 and 16 April:

{
"title": "Company offsite",
"start_time": "2026-04-15T00:00:00Z",
"end_time": "2026-04-17T00:00:00Z",
"all_day": true
}

All-day events are stored as whole days:

  • The first day is the date you wrote. start_time becomes midnight UTC of the date in the value, read in its own offset, so 2026-04-15T00:00:00+09:00 is still 15 April.
  • The end covers its last day. end_time becomes midnight UTC after the last day it touches: its own date when it is exactly midnight, otherwise the next day. So an end of 2026-04-16T23:59:59Z also means “through 16 April”. An event is at least one day long.
  • Responses and feeds use that form. The event comes back as 2026-04-15T00:00:00.000Z → 2026-04-17T00:00:00.000Z, and iCal feeds and linked Google or Outlook calendars show the same dates.
  • Setting all_day: true on a timed event widens it to the day or days it covers.
  • Moving one bound of an all-day event snaps only that bound; the other stays as it is.
  • Moving an all-day event with a non-UTC offset: also send all_day: true in the PATCH, so the date you wrote is kept. Without it, the date comes from the UTC instant.
  • Availability treats an all-day event as busy for those whole UTC days. An all-day event on 15 April blocks 15 April 00:00 to 16 April 00:00 UTC, which is 09:00 to 09:00 in Tokyo. To block a local day, create a timed event from local midnight to local midnight instead. All-day events from subscribed iCal feeds and connected Google or Outlook calendars are different: they block the person’s local day.

Retrieve events for a specific calendar with optional filters.

Terminal window
curl "https://api.chronary.ai/v1/calendars/cal_x1y2z3/events?start_after=2026-04-07T00:00:00Z&start_before=2026-04-14T00:00:00Z&status=confirmed&limit=20" \
-H "Authorization: Bearer chr_sk_your_key_here"

Filter parameters:

ParameterTypeDescription
start_afterISO 8601Only events starting after this time
start_beforeISO 8601Only events starting before this time
statusstringFilter by status: confirmed, tentative, cancelled
sourcestringFilter by source: internal, external_ical
limitintegerResults per page (default: 50, max: 200)
offsetintegerNumber of results to skip for pagination
expandbooleanExpand recurring series into individual occurrences (requires both start_after and start_before, window up to 366 days) — see Recurring events

Query all events across every calendar owned by an agent. This is useful when an agent has multiple calendars and you need a unified view.

Terminal window
curl "https://api.chronary.ai/v1/agents/agt_a1b2c3d4/events?start_after=2026-04-07T00:00:00Z&limit=50" \
-H "Authorization: Bearer chr_sk_your_key_here"
Terminal window
curl https://api.chronary.ai/v1/calendars/cal_x1y2z3/events/evt_m1n2o3 \
-H "Authorization: Bearer chr_sk_your_key_here"

Only the fields you include in the request body are updated. Omitted fields remain unchanged.

Terminal window
curl -X PATCH https://api.chronary.ai/v1/calendars/cal_x1y2z3/events/evt_m1n2o3 \
-H "Authorization: Bearer chr_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Product demo with Globex Industries (rescheduled)",
"start_time": "2026-04-11T15:00:00Z",
"end_time": "2026-04-11T16:00:00Z"
}'
Terminal window
curl -X DELETE https://api.chronary.ai/v1/calendars/cal_x1y2z3/events/evt_m1n2o3 \
-H "Authorization: Bearer chr_sk_your_key_here"

Add a recurrence_rule (an RFC 5545 RRULE subset, without the RRULE: prefix) to make an event repeat. A series is stored as a single event and counts once toward your monthly events quota.

Terminal window
curl -X POST https://api.chronary.ai/v1/calendars/cal_x1y2z3/events \
-H "Authorization: Bearer chr_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Weekly pipeline review",
"start_time": "2026-04-13T09:00:00Z",
"end_time": "2026-04-13T09:30:00Z",
"recurrence_rule": "FREQ=WEEKLY;BYDAY=MO;COUNT=12"
}'

Common rules:

GoalRule
Every day for two weeksFREQ=DAILY;COUNT=14
Mon/Wed/Fri standups until JuneFREQ=WEEKLY;BYDAY=MO,WE,FR;UNTIL=20260630
Every other weekFREQ=WEEKLY;INTERVAL=2;COUNT=10
Second Tuesday of each monthFREQ=MONTHLY;BYDAY=2TU;COUNT=6
Last day of each monthFREQ=MONTHLY;BYMONTHDAY=-1;COUNT=12

Three things to keep in mind:

  • start_time is the first occurrence and must match the rule (a BYDAY=MO rule needs a Monday start_time).
  • Set timezone for anything a human attends. Without it the series repeats in UTC, so “every Monday 09:00 UTC” drifts by an hour of local time when daylight saving changes. See Repeat in a local time zone.
  • Plan limits — Free allows 1 active series and every rule must be bounded (COUNT or UNTIL) ending within 90 days of the series start; Developer allows 50 series and Pro allows 250, both with unbounded rules.

Pass an IANA timezone with the rule and the series repeats on local wall time in that zone. A weekly class at 16:00 in Los Angeles stays at 16:00 local all year, in winter (UTC−8) and in summer (UTC−7):

Terminal window
curl -X POST https://api.chronary.ai/v1/calendars/cal_x1y2z3/events \
-H "Authorization: Bearer chr_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Pottery class",
"start_time": "2026-11-17T16:00:00-08:00",
"end_time": "2026-11-17T17:30:00-08:00",
"timezone": "America/Los_Angeles",
"recurrence_rule": "FREQ=WEEKLY;BYDAY=TU"
}'

start_time is still stored and returned in UTC; timezone tells Chronary which local clock the pattern follows. BYDAY, BYMONTHDAY, the check that start_time matches the rule, and a date-only UNTIL are all read in that zone. The event’s timezone is its own: it does not follow later changes to the calendar’s time zone. Omit it (or set null) for a UTC series.

Daylight-saving edge cases are handled the same way every time:

  • Times that don’t exist (the spring-forward gap, e.g. 02:30 on the night clocks jump from 02:00 to 03:00) move forward by the length of the gap, to 03:30. The expanded instance is flagged dstAdjusted: "gap".
  • Times that happen twice (the fall-back hour) use the first of the two.
  • Duration is elapsed time. A 90-minute event lasts 90 minutes, even across a clock change.
  • A date-only UNTIL (UNTIL=20270601) includes the whole of that local day.
  • All-day events ignore the zone. They repeat on calendar dates.

Expanded instances show the local time they were generated for, so you don’t have to convert UTC yourself. After the March clock change, the same class is at 23:00 UTC but still 16:00 local:

{
"id": "evt_m1n2o3",
"startTime": "2027-03-16T23:00:00Z",
"endTime": "2027-03-17T00:30:00Z",
"timezone": "America/Los_Angeles",
"recurringEventId": "evt_m1n2o3",
"originalStartTime": "2027-03-16T23:00:00Z",
"startLocal": "2027-03-16T16:00:00",
"utcOffset": "-07:00",
"dstAdjusted": null
}

iCal feeds write a zoned series with TZID and a matching VTIMEZONE, so phone and desktop calendar apps show it at the same local time across daylight-saving changes.

Listing returns the series as one event by default. Pass expand=true with a time window to get per-occurrence instances:

Terminal window
curl "https://api.chronary.ai/v1/calendars/cal_x1y2z3/events?expand=true&start_after=2026-04-01T00:00:00Z&start_before=2026-04-30T23:59:59Z" \
-H "Authorization: Bearer chr_sk_your_key_here"

Instances share the master’s id and carry recurringEventId and originalStartTime so you can tell them apart. Availability queries automatically treat every occurrence as busy.

Cancel a single occurrence by passing its start time to DELETE — the rest of the series is untouched:

Terminal window
curl -X DELETE "https://api.chronary.ai/v1/calendars/cal_x1y2z3/events/evt_m1n2o3?occurrence_start=2026-04-20T09:00:00Z" \
-H "Authorization: Bearer chr_sk_your_key_here"
# 200 OK — returns the updated series master

A bare DELETE (no occurrence_start) cancels the whole series. To reschedule one occurrence, cancel it and create a standalone event at the new time.

PATCH always edits the full series — changing times, the rule, the time zone, or setting recurrence_rule: null (which converts it back to a one-off) applies to every occurrence.

Cancelled occurrences survive a series edit. When you change start_time, recurrence_rule or timezone, each cancelled occurrence moves to the new series’ occurrence on the same local date, so cancelling “the class on December 1” stays cancelled when the class moves from 16:00 to 17:00. A cancelled date that has no occurrence in the new series (for example after moving the class from Tuesday to Wednesday) can’t be carried over: it is removed and listed in the response’s droppedExdates. Ask your user which new date they meant and cancel it again with DELETE ?occurrence_start=. Setting recurrence_rule: null clears every cancellation, and changing only end_time leaves them as they are.

A series created before you set timezone repeats in UTC. To move it to local time, send timezone and the rule re-expressed in local terms in one PATCH. They are checked together, so the series is never left half-converted.

For example, a Tuesday 16:00 Los Angeles class was stored in UTC as Wednesday 00:00 (BYDAY=WE, start_time 2026-11-18T00:00:00Z). In UTC terms it is a Wednesday class, which is why it would drift to 17:00 local in March. Its local weekday is Tuesday:

Terminal window
curl -X PATCH https://api.chronary.ai/v1/calendars/cal_x1y2z3/events/evt_m1n2o3 \
-H "Authorization: Bearer chr_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"timezone": "America/Los_Angeles",
"recurrence_rule": "FREQ=WEEKLY;BYDAY=TU"
}'

start_time stays 2026-11-18T00:00:00Z, which is Tuesday 16:00 in Los Angeles, so it matches the new rule. From March onward the occurrences start at 23:00 UTC, still 16:00 local. Cancelled Tuesday classes keep their local dates, and the response’s droppedExdates is []. Sending only timezone would fail with 400: a Wednesday BYDAY with a Tuesday local start doesn’t match.

See the Events API reference for the complete rule grammar and error codes.

All list endpoints return paginated results:

{
"data": [ ... ],
"total": 142,
"limit": 50,
"offset": 0
}

To fetch the next page, increment offset by limit:

GET /v1/calendars/cal_x1y2z3/events?limit=50&offset=50

The maximum limit is 200. The default is 50.

StatusCodeCause
400validation_errorstart_time or end_time is not an ISO 8601 date-time with Z or a UTC offset (param names the field)
400validation_errorend_time is not after start_time
403forbiddenAttempted to edit/delete an event with source: "external_ical" (“External events are read-only”)
404not_foundThe calendar ID does not exist (“Calendar not found”)
404not_foundThe event ID does not exist on this calendar (“Event not found”)
409agent_inactiveThe calendar belongs to a decommissioned agent and is read-only
429quota_exceededMonthly event limit reached (metric: "events")