{"openapi":"3.1.0","info":{"title":"Chronary API","version":"1.0.0","description":"Calendar-as-a-service API for AI agents.\n\nManage calendars, events, and availability for AI and human agents.\nAll endpoints require an API key passed as a Bearer token.\n\n**Authentication:** `Authorization: Bearer chr_sk_...` or `Authorization: Bearer chr_ak_...`\n\n**Rate limit:** 10 requests/second per API key. Exceeds return HTTP 429.\n\n**Quotas:** Monthly operation limits by plan — see [Quotas](https://docs.chronary.ai/reference/quotas).\n\n**Agent bootstrap:** Custom extensions prefixed `x-agent-*` describe the self-signup flow for AI agents. These are not part of any registered OpenAPI extension — they are a Chronary convention.","contact":{"name":"Chronary Support","email":"support@chronary.ai","url":"https://docs.chronary.ai"}},"servers":[{"url":"https://api.chronary.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key with `chr_sk_*` for org-level access or `chr_ak_*` for agent-scoped access. Pass in the Authorization header: `Authorization: Bearer chr_sk_...`"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","example":"invalid_request"},"message":{"type":"string","example":"The field \"name\" is required."},"request_id":{"type":"string","example":"req_01H9X4M2P5R8T6V0"}},"required":["type","message","request_id"]}},"required":["error"]},"Agent":{"type":"object","properties":{"id":{"type":"string","example":"agt_01H9X4M2P5R8T6V0"},"name":{"type":"string","example":"Scheduling Assistant"},"type":{"type":"string","enum":["ai","human","resource"],"example":"ai"},"description":{"type":["string","null"],"example":"Books meetings with prospects."},"status":{"type":"string","enum":["active","paused","decommissioned"],"example":"active"},"metadata":{"type":"object","additionalProperties":{},"example":{}},"created_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00.000Z"}},"required":["id","name","type","description","status","metadata","created_at","updated_at"]},"AgentList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}},"total":{"type":"integer","example":3}},"required":["data","total"]},"Calendar":{"type":"object","properties":{"id":{"type":"string","example":"cal_01H9X4M2P5R8T6V0"},"agent_id":{"type":["string","null"],"example":"agt_01H9X4M2P5R8T6V0"},"name":{"type":"string","example":"Work Calendar"},"timezone":{"type":"string","example":"America/Los_Angeles"},"agent_status":{"type":"string","enum":["idle","working","waiting","error"],"example":"idle"},"ical_url":{"type":"string","format":"uri","example":"https://api.chronary.ai/ical/abc123def456ghi789.ics"},"default_reminders":{"type":["array","null"],"items":{"type":"integer"},"example":[10],"description":"Default reminder offsets (minutes before start) inherited by events that don't set their own. null = use the system default (10 min); [] = no reminders."},"metadata":{"type":"object","additionalProperties":{},"example":{}},"created_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00.000Z"}},"required":["id","agent_id","name","timezone","agent_status","ical_url","default_reminders","metadata","created_at","updated_at"]},"CalendarList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Calendar"}},"total":{"type":"integer","example":2}},"required":["data","total"]},"Event":{"type":"object","properties":{"id":{"type":"string","example":"evt_01H9X4M2P5R8T6V0"},"calendar_id":{"type":"string","example":"cal_01H9X4M2P5R8T6V0"},"title":{"type":"string","example":"Team standup"},"description":{"type":["string","null"],"example":"Daily sync meeting."},"start_time":{"type":"string","format":"date-time","example":"2025-01-20T09:00:00.000Z"},"end_time":{"type":"string","format":"date-time","example":"2025-01-20T09:30:00.000Z"},"all_day":{"type":"boolean","example":false},"status":{"type":"string","enum":["confirmed","tentative","cancelled","hold"],"example":"confirmed"},"source":{"type":"string","enum":["internal","external_ical"],"example":"internal"},"metadata":{"type":"object","additionalProperties":{},"example":{}},"reminders":{"type":["array","null"],"items":{"type":"integer"},"example":[10],"description":"Reminder offsets (minutes before start). Each fires an event.reminder webhook and emits a VALARM in the iCal feed. null = inherit the calendar default (then the system default of 10 min); [] = no reminders."},"hold_expires_at":{"type":["string","null"],"format":"date-time","example":null,"description":"When set, the event is a tentative hold that auto-expires at this timestamp. Must be 30 seconds to 15 minutes in the future when creating a hold; the cap exists to keep held slots short enough that they do not block real scheduling for long."},"hold_priority":{"type":["integer","null"],"example":0,"description":"Priority for conflict resolution. Higher values pre-empt lower-priority overlapping holds."},"created_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00.000Z"}},"required":["id","calendar_id","title","description","start_time","end_time","all_day","status","source","metadata","reminders","created_at","updated_at"]},"EventList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"total":{"type":"integer","example":42}},"required":["data","total"]},"CalendarContext":{"type":"object","properties":{"calendar_id":{"type":"string","example":"cal_01H9X4M2P5R8T6V0"},"now":{"type":"string","format":"date-time","example":"2026-04-14T10:30:00.000Z"},"agent_status":{"type":"string","enum":["idle","working","waiting","error"],"example":"idle"},"current_event":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":["object","null"],"description":"Currently active event, or null"}]},"next_event":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":["object","null"],"description":"Next upcoming event, or null"}]},"recent_events":{"type":"array","items":{"$ref":"#/components/schemas/Event"},"description":"Up to 3 most recently ended events"},"upcoming":{"type":"array","items":{"$ref":"#/components/schemas/Event"},"description":"Up to 5 events starting within the next 24 hours"}},"required":["calendar_id","now","agent_status","current_event","next_event","recent_events","upcoming"]},"Slot":{"type":"object","properties":{"start":{"type":"string","format":"date-time","example":"2025-01-20T09:00:00.000Z"},"end":{"type":"string","format":"date-time","example":"2025-01-20T09:30:00.000Z"},"available":{"type":"boolean","example":true}},"required":["start","end","available"]},"AvailabilityResponse":{"type":"object","properties":{"slots":{"type":"array","items":{"$ref":"#/components/schemas/Slot"}}},"required":["slots"]},"Webhook":{"type":"object","properties":{"id":{"type":"string","example":"whk_01H9X4M2P5R8T6V0"},"url":{"type":"string","format":"uri","example":"https://example.com/webhooks/chronary"},"events":{"type":"array","items":{"type":"string","enum":["agent.created","agent.updated","event.created","event.updated","event.deleted","event.started","event.ended","event.reminder","event.hold_created","event.hold_expired","event.hold_released","event.hold_confirmed","proposal.created","proposal.responded","proposal.confirmed","proposal.expired","proposal.cancelled","webhook.deactivated"]},"example":["event.created","event.updated"]},"active":{"type":"boolean","example":true},"created_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00.000Z"}},"required":["id","url","events","active","created_at"]},"WebhookList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"total":{"type":"integer","example":1}},"required":["data","total"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","example":"whd_01H9X4M2P5R8T6V0"},"subscription_id":{"type":"string","example":"whk_01H9X4M2P5R8T6V0"},"event_type":{"type":"string","enum":["agent.created","agent.updated","event.created","event.updated","event.deleted","event.started","event.ended","event.reminder","event.hold_created","event.hold_expired","event.hold_released","event.hold_confirmed","proposal.created","proposal.responded","proposal.confirmed","proposal.expired","proposal.cancelled","webhook.deactivated"],"example":"event.created"},"status":{"type":"string","enum":["pending","delivered","failed"],"example":"delivered"},"attempts":{"type":"integer","example":1},"last_attempt_at":{"type":["string","null"],"format":"date-time","example":"2026-04-18T10:00:00.000Z"},"next_retry_at":{"type":["string","null"],"format":"date-time","example":null},"created_at":{"type":"string","format":"date-time","example":"2026-04-18T09:55:00.000Z"},"payload":{"type":"object","additionalProperties":{},"description":"Present only when include_payload=true","example":{"id":"evt_abc","title":"Meeting"}}},"required":["id","subscription_id","event_type","status","attempts","last_attempt_at","next_retry_at","created_at"]},"WebhookDeliveryList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"total":{"type":"integer","example":42},"limit":{"type":"integer","example":20},"offset":{"type":"integer","example":0},"stats":{"type":"object","properties":{"pending":{"type":"integer","example":2},"delivered":{"type":"integer","example":35},"failed":{"type":"integer","example":5}},"required":["pending","delivered","failed"],"description":"All-time delivery counts for this webhook"}},"required":["data","total","limit","offset","stats"]},"ICalSubscription":{"type":"object","properties":{"id":{"type":"string","example":"ics_01H9X4M2P5R8T6V0"},"agent_id":{"type":"string","example":"agt_01H9X4M2P5R8T6V0"},"calendar_id":{"type":"string","example":"cal_01H9X4M2P5R8T6V0"},"url":{"type":"string","format":"uri","example":"https://calendar.google.com/calendar/ical/example/basic.ics"},"label":{"type":["string","null"],"example":"Google Calendar"},"status":{"type":"string","enum":["active","error","paused"],"example":"active"},"last_synced_at":{"type":["string","null"],"format":"date-time","example":"2025-01-15T10:00:00.000Z"},"last_error":{"type":["string","null"],"example":null},"created_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00.000Z"}},"required":["id","agent_id","calendar_id","url","label","status","last_synced_at","last_error","created_at"]},"ICalSubscriptionList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ICalSubscription"}},"total":{"type":"integer","example":1}},"required":["data","total"]},"Usage":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"period_start":{"type":"string","format":"date-time","example":"2026-04-01T00:00:00.000Z"},"period_end":{"type":"string","format":"date-time","example":"2026-04-30T23:59:59.000Z"},"agents":{"type":"object","properties":{"used":{"type":"integer","example":120},"limit":{"type":["integer","null"],"example":2500,"description":"`null` means unlimited."}},"required":["used","limit"]},"calendars":{"type":"object","properties":{"used":{"type":"integer","example":120},"limit":{"type":["integer","null"],"example":2500,"description":"`null` means unlimited."}},"required":["used","limit"]},"events":{"type":"object","properties":{"used":{"type":"integer","example":120},"limit":{"type":["integer","null"],"example":2500,"description":"`null` means unlimited."}},"required":["used","limit"]},"api_calls":{"type":"object","properties":{"used":{"type":"integer","example":120},"limit":{"type":["integer","null"],"example":2500,"description":"`null` means unlimited."}},"required":["used","limit"]},"webhooks":{"type":"object","properties":{"used":{"type":"integer","example":120},"limit":{"type":["integer","null"],"example":2500,"description":"`null` means unlimited."}},"required":["used","limit"]},"availability_queries":{"type":"object","properties":{"used":{"type":"integer","example":120},"limit":{"type":["integer","null"],"example":2500,"description":"`null` means unlimited."}},"required":["used","limit"]},"ical_subscriptions":{"type":"object","properties":{"used":{"type":"integer","example":120},"limit":{"type":["integer","null"],"example":2500,"description":"`null` means unlimited."}},"required":["used","limit"]},"proposals":{"type":"object","properties":{"used":{"type":"integer","example":120},"limit":{"type":["integer","null"],"example":2500,"description":"`null` means unlimited."}},"required":["used","limit"]},"scoped_keys":{"type":"object","properties":{"count":{"type":"integer","example":3}},"required":["count"],"description":"Active agent-scoped (`chr_ak_*`) keys. Unlike quotas, this is a direct count with no plan limit."},"holds":{"type":"object","properties":{"created":{"type":"integer","example":24},"confirmed":{"type":"integer","example":18},"expired":{"type":"integer","example":4}},"required":["created","confirmed","expired"],"description":"Temporal-hold lifecycle counters for the current period. Informational — not gated by any plan limit. Funnel identity: `created = confirmed + expired + active`, where `active` is derived (not stored). Counts cover all three end-of-hold paths (TTL expiry, manual release, priority bump)."},"cross_calendar_queries":{"type":"object","properties":{"used":{"type":"integer","example":11}},"required":["used"],"description":"Availability requests that touched more than one calendar in the current period. Informational — gated separately by the `cross_calendar_availability` capability, not by this counter."}},"required":["plan","period_start","period_end","agents","calendars","events","api_calls","webhooks","availability_queries","ical_subscriptions","proposals","scoped_keys","holds","cross_calendar_queries"]},"AuditLogEntry":{"type":"object","properties":{"id":{"type":"string","example":"aud_abc123def456"},"action":{"type":"string","example":"agent.create"},"actor_key_prefix":{"type":["string","null"],"example":"chr_sk_abcdef12345"},"agent_id":{"type":["string","null"],"example":null},"resource":{"type":["string","null"],"example":"agt_1"},"ip":{"type":["string","null"],"example":"203.0.113.10"},"status":{"type":"integer","example":201},"method":{"type":"string","example":"POST"},"path":{"type":"string","description":"Route template (entity IDs replaced with `:id`).","example":"/v1/agents"},"duration_ms":{"type":"integer","example":42},"request_id":{"type":["string","null"],"example":"req_8e9f..."},"created_at":{"type":"string","format":"date-time","example":"2026-05-10T10:00:00.000Z"}},"required":["id","action","actor_key_prefix","agent_id","resource","ip","status","method","path","duration_ms","request_id","created_at"]},"AuditLogResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogEntry"}},"pagination":{"type":"object","properties":{"next_cursor":{"type":["string","null"],"description":"Opaque cursor for the next page. Null if no more results.","example":"MjAyNi0wNS0xMFQxMDowMDowMC4wMDBafGF1ZF8x"}},"required":["next_cursor"]},"retention_days":{"type":["integer","null"],"description":"Audit-log retention window for the caller plan (days). Null = unlimited (Custom plan).","example":90},"range_clamped":{"type":"boolean","description":"True when the requested `from` was outside the retention window and the server clamped it. UI uses this to render an upgrade hint.","example":false}},"required":["data","pagination","retention_days","range_clamped"]},"ScopedApiKey":{"type":"object","properties":{"id":{"type":"string","example":"db59cb2d-5bd6-4631-84e7-c65db55ff9f9"},"key_prefix":{"type":"string","example":"chr_ak_0A1B2C3D4E5F6G7H"},"agent_id":{"type":"string","example":"agt_01H9X4M2P5R8T6V0"},"label":{"type":["string","null"],"example":"Customer A"},"created_at":{"type":"string","format":"date-time","example":"2026-04-17T16:20:00.000Z"}},"required":["id","key_prefix","agent_id","label","created_at"]},"CreatedScopedApiKey":{"allOf":[{"$ref":"#/components/schemas/ScopedApiKey"},{"type":"object","properties":{"key":{"type":"string","example":"chr_ak_0123456789ABCDEFghijklmnopqrstuvwxyz0123456"}},"required":["key"]}]},"ScopedApiKeyList":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/ScopedApiKey"}}},"required":["keys"]},"CreateAgent":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"type":{"type":"string","enum":["ai","human","resource"]},"description":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}}},"required":["name","type"]},"UpdateAgent":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["active","paused"]}}},"ListAgentsQuery":{"type":"object","properties":{"type":{"type":"string","enum":["ai","human","resource"]},"status":{"type":"string","enum":["active","paused","decommissioned"]},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50},"offset":{"type":["integer","null"],"minimum":0,"default":0}}},"CreateCalendar":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"timezone":{"type":"string","minLength":1},"agent_status":{"type":"string","enum":["idle","working","waiting","error"]},"default_reminders":{"type":["array","null"],"items":{"type":"integer","minimum":1,"maximum":40320},"maxItems":5},"metadata":{"type":"object","additionalProperties":{}}},"required":["name","timezone"]},"UpdateCalendar":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"timezone":{"type":"string","minLength":1},"agent_status":{"type":"string","enum":["idle","working","waiting","error"]},"default_reminders":{"type":["array","null"],"items":{"type":"integer","minimum":1,"maximum":40320},"maxItems":5},"metadata":{"type":"object","additionalProperties":{}}}},"ListCalendarsQuery":{"type":"object","properties":{"include":{"type":"string","enum":["all"]},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50},"offset":{"type":["integer","null"],"minimum":0,"default":0}}},"CreateEvent":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"description":{"type":"string"},"all_day":{"type":"boolean","default":false},"status":{"type":"string","enum":["confirmed","tentative","cancelled","hold"],"default":"confirmed"},"metadata":{"type":"object","additionalProperties":{}},"reminders":{"type":["array","null"],"items":{"type":"integer","minimum":1,"maximum":40320},"maxItems":5},"hold_expires_at":{"type":"string","format":"date-time"},"hold_priority":{"type":"integer","minimum":0,"maximum":100}},"required":["title","start_time","end_time"]},"UpdateEvent":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":["string","null"]},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"all_day":{"type":"boolean"},"status":{"type":"string","enum":["confirmed","tentative","cancelled"]},"metadata":{"type":"object","additionalProperties":{}},"reminders":{"type":["array","null"],"items":{"type":"integer","minimum":1,"maximum":40320},"maxItems":5}}},"ListEventsQuery":{"type":"object","properties":{"start_after":{"type":"string","format":"date-time"},"start_before":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["confirmed","tentative","cancelled","hold"]},"source":{"type":"string","enum":["internal","external_ical"]},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50},"offset":{"type":["integer","null"],"minimum":0,"default":0}}},"AvailabilityQuery":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"slot_duration":{"type":"string","enum":["15m","30m","45m","1h","2h"],"default":"30m"},"include_busy":{"type":"string","enum":["true","false"],"default":"false"}},"required":["start","end"]},"CrossAgentAvailabilityQuery":{"type":"object","properties":{"agents":{"type":"string","minLength":1},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"slot_duration":{"type":"string","enum":["15m","30m","45m","1h","2h"],"default":"30m"},"calendars":{"type":"string"},"include_busy":{"type":"string","enum":["true","false"],"default":"false"}},"required":["agents","start","end"]},"UpdateAvailabilityRules":{"type":"object","properties":{"buffer_before_minutes":{"type":"integer","minimum":0,"maximum":120,"default":0},"buffer_after_minutes":{"type":"integer","minimum":0,"maximum":120,"default":0},"working_hours":{"type":["object","null"],"properties":{"mon":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]},"tue":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]},"wed":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]},"thu":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]},"fri":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]},"sat":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]},"sun":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"default":null},"timezone":{"type":"string","minLength":1,"maxLength":64,"default":"UTC"}}},"AvailabilityRules":{"type":"object","properties":{"id":{"type":"string","example":"avr_01H9X4M2P5R8T6V0"},"calendar_id":{"type":"string","example":"cal_01H9X4M2P5R8T6V0"},"buffer_before_minutes":{"type":"number","example":10},"buffer_after_minutes":{"type":"number","example":5},"working_hours":{"example":{"mon":{"start":"09:00","end":"17:00"}}},"timezone":{"type":"string","example":"America/New_York"},"created_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00.000Z"}},"required":["id","calendar_id","buffer_before_minutes","buffer_after_minutes","timezone","created_at","updated_at"]},"CreateWebhook":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["agent.created","agent.updated","event.created","event.updated","event.deleted","event.started","event.ended","event.reminder","event.hold_created","event.hold_expired","event.hold_released","event.hold_confirmed","proposal.created","proposal.responded","proposal.confirmed","proposal.expired","proposal.cancelled","webhook.deactivated"]},"minItems":1}},"required":["url","events"]},"UpdateWebhook":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["agent.created","agent.updated","event.created","event.updated","event.deleted","event.started","event.ended","event.reminder","event.hold_created","event.hold_expired","event.hold_released","event.hold_confirmed","proposal.created","proposal.responded","proposal.confirmed","proposal.expired","proposal.cancelled","webhook.deactivated"]},"minItems":1},"active":{"type":"boolean"}}},"ListWebhooksQuery":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":100,"default":20},"offset":{"type":["integer","null"],"minimum":0,"default":0}}},"ListDeliveriesQuery":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":100,"default":20},"offset":{"type":["integer","null"],"minimum":0,"default":0},"status":{"type":"string","enum":["pending","delivered","failed"]},"include_payload":{"type":"string","enum":["true","false"]}}},"CreateScopedApiKey":{"type":"object","properties":{"agent_id":{"type":"string","pattern":"^agt_"},"label":{"type":"string","minLength":1,"maxLength":100}},"required":["agent_id"]},"CreateICalSubscription":{"type":"object","properties":{"calendar_id":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"label":{"type":"string","minLength":1,"maxLength":255}},"required":["calendar_id","url"]},"UpdateICalSubscription":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":255},"url":{"type":"string","format":"uri"}}},"ListICalSubscriptionsQuery":{"type":"object","properties":{"status":{"type":"string","enum":["active","error","paused"]},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50},"offset":{"type":["integer","null"],"minimum":0,"default":0}}},"TermsVersion":{"type":"object","properties":{"version":{"type":"string","example":"2026-05-11"},"effective_at":{"type":"string","example":"2026-04-26"},"url":{"type":"string","example":"https://chronary.ai/terms/v/2026-05-11"},"material":{"type":"boolean","description":"When `true`, clients should block on re-acceptance."}},"required":["version","effective_at","url","material"]},"ReacceptRequest":{"type":"object","properties":{"tos_version":{"type":"string","minLength":1,"example":"2026-05-11","description":"Must equal `CURRENT_TERMS_VERSION`."}},"required":["tos_version"]},"ReacceptResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"accepted_terms_version":{"type":"string","example":"2026-05-11"},"accepted_terms_at":{"type":"string","format":"date-time","example":"2026-04-24T02:30:00.000Z"}},"required":["accepted_terms_version","accepted_terms_at"]}},"required":["data"]},"DataExport":{"type":"object","properties":{"exported_at":{"type":"string","format":"date-time"},"format_version":{"type":"string","enum":["1"]},"org":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"plan":{"type":"string"},"signup_source":{"type":"string"},"status":{"type":"string"},"oauth_provider":{"type":["string","null"]},"oauth_provider_id":{"type":["string","null"]},"email_verified":{"type":"boolean"},"onboarding_completed_at":{"type":["string","null"],"format":"date-time"},"accepted_terms_version":{"type":["string","null"]},"accepted_terms_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","email","plan","signup_source","status","oauth_provider","oauth_provider_id","email_verified","onboarding_completed_at","accepted_terms_version","accepted_terms_at","created_at","updated_at"]},"agents":{"type":"array","items":{}},"calendars":{"type":"array","items":{}},"events":{"type":"array","items":{}},"availability_rules":{"type":"array","items":{}},"ical_subscriptions":{"type":"array","items":{}},"webhook_subscriptions":{"type":"array","items":{}},"api_keys":{"type":"array","items":{}},"scheduling_proposals":{"type":"array","items":{}},"proposal_slots":{"type":"array","items":{}},"proposal_responses":{"type":"array","items":{}},"usage_records":{"type":"array","items":{}},"quota_counters":{"type":"array","items":{}},"tos_acceptances":{"type":"array","items":{}},"account_claims_initiated":{"type":"array","items":{}},"account_claims_targeting_this_org":{"type":"array","items":{}},"feedback_submissions":{"type":"array","items":{}}},"required":["exported_at","format_version","org","agents","calendars","events","availability_rules","ical_subscriptions","webhook_subscriptions","api_keys","scheduling_proposals","proposal_slots","proposal_responses","usage_records","quota_counters","tos_acceptances","account_claims_initiated","account_claims_targeting_this_org","feedback_submissions"]},"ClaimInitiateRequest":{"type":"object","properties":{"agent_org_email":{"type":"string","format":"email","example":"agent@example.com"}},"required":["agent_org_email"]},"ClaimInitiateResponse":{"type":"object","properties":{"claim_id":{"type":"string","format":"uuid"},"message":{"type":"string"}},"required":["claim_id","message"]},"ClaimVerifyRequest":{"type":"object","properties":{"claim_id":{"type":"string","format":"uuid"},"otp":{"type":"string","pattern":"^\\d{6}$","example":"123456"}},"required":["claim_id","otp"]},"ClaimVerifyResponse":{"type":"object","properties":{"claim_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["verified"]},"revocation_window_ends_at":{"type":"string","format":"date-time"},"expected_completion_at":{"type":"string","format":"date-time"}},"required":["claim_id","status","revocation_window_ends_at","expected_completion_at"]},"ClaimRevokeRequest":{"type":"object","properties":{"revocation_token":{"type":"string"}},"required":["revocation_token"]},"ClaimRevokeResponse":{"type":"object","properties":{"revoked":{"type":"boolean","enum":[true]}},"required":["revoked"]},"Claim":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"target_org_email_masked":{"type":"string"},"status":{"type":"string","enum":["pending","verified","completed","revoked","failed"]},"created_at":{"type":"string","format":"date-time"},"verified_at":{"type":["string","null"],"format":"date-time"},"revocation_window_ends_at":{"type":["string","null"],"format":"date-time"},"expected_completion_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"failure_reason":{"type":["string","null"]}},"required":["id","target_org_email_masked","status","created_at","verified_at","revocation_window_ends_at","expected_completion_at","completed_at","revoked_at","failure_reason"]},"ClaimsListResponse":{"type":"object","properties":{"claims":{"type":"array","items":{"$ref":"#/components/schemas/Claim"}}},"required":["claims"]},"WebhookCreated":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","properties":{"secret":{"type":"string","example":"whsec_abc123...","description":"HMAC-SHA256 signing secret — returned once at creation time only. Store it securely."}},"required":["secret"]}]},"ProposalSlot":{"type":"object","properties":{"id":{"type":"string","example":"slt_abc123def456"},"start_time":{"type":"string","format":"date-time","example":"2026-05-01T10:00:00.000Z"},"end_time":{"type":"string","format":"date-time","example":"2026-05-01T11:00:00.000Z"},"weight":{"type":"number","example":1.5},"calendar_id":{"type":["string","null"],"example":"cal_abc123def456"}},"required":["id","start_time","end_time","weight","calendar_id"]},"ProposalResponse":{"type":"object","properties":{"id":{"type":"string","example":"rsp_abc123def456"},"agent_id":{"type":"string","example":"agt_abc123def456"},"response":{"type":"string","enum":["accept","decline","counter"],"example":"accept"},"selected_slot_id":{"type":["string","null"],"example":"slt_abc123def456"},"counter_slots":{"type":["array","null"],"items":{"type":"object","additionalProperties":{}},"example":null},"message":{"type":["string","null"],"example":null},"created_at":{"type":"string","format":"date-time","example":"2026-04-15T10:00:00.000Z"}},"required":["id","agent_id","response","selected_slot_id","counter_slots","message","created_at"]},"Proposal":{"type":"object","properties":{"id":{"type":"string","example":"spr_abc123def456"},"title":{"type":"string","example":"Q2 planning sync"},"description":{"type":["string","null"],"example":"Quarterly planning discussion"},"organizer_agent_id":{"type":"string","example":"agt_abc123def456"},"participant_agent_ids":{"type":"array","items":{"type":"string"},"example":["agt_abc123def456","agt_xyz789"]},"calendar_id":{"type":"string","example":"cal_abc123def456"},"status":{"type":"string","enum":["pending","confirmed","expired","cancelled"],"example":"pending"},"expires_at":{"type":["string","null"],"format":"date-time","example":"2026-05-01T00:00:00.000Z"},"resolved_slot":{"type":["object","null"],"additionalProperties":{},"example":null},"created_event_id":{"type":["string","null"],"example":null},"metadata":{"type":"object","additionalProperties":{},"example":{}},"created_at":{"type":"string","format":"date-time","example":"2026-04-15T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-04-15T10:00:00.000Z"},"slots":{"type":"array","items":{"$ref":"#/components/schemas/ProposalSlot"}},"responses":{"type":"array","items":{"$ref":"#/components/schemas/ProposalResponse"}}},"required":["id","title","description","organizer_agent_id","participant_agent_ids","calendar_id","status","expires_at","resolved_slot","created_event_id","metadata","created_at","updated_at","slots","responses"]},"ProposalSummary":{"type":"object","properties":{"id":{"type":"string","example":"spr_abc123def456"},"title":{"type":"string","example":"Q2 planning sync"},"description":{"type":["string","null"],"example":null},"organizer_agent_id":{"type":"string","example":"agt_abc123def456"},"participant_agent_ids":{"type":"array","items":{"type":"string"},"example":["agt_abc123def456"]},"calendar_id":{"type":"string","example":"cal_abc123def456"},"status":{"type":"string","enum":["pending","confirmed","expired","cancelled"],"example":"pending"},"expires_at":{"type":["string","null"],"format":"date-time","example":null},"resolved_slot":{"type":["object","null"],"additionalProperties":{},"example":null},"created_event_id":{"type":["string","null"],"example":null},"metadata":{"type":"object","additionalProperties":{},"example":{}},"created_at":{"type":"string","format":"date-time","example":"2026-04-15T10:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-04-15T10:00:00.000Z"}},"required":["id","title","description","organizer_agent_id","participant_agent_ids","calendar_id","status","expires_at","resolved_slot","created_event_id","metadata","created_at","updated_at"]},"ProposalList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProposalSummary"}},"total":{"type":"integer","example":5}},"required":["data","total"]},"RespondToProposalBody":{"type":"object","properties":{"agent_id":{"type":"string"},"response":{"type":"string","enum":["accept","decline","counter"]},"selected_slot_id":{"type":"string","description":"Required when response is \"accept\""},"counter_slots":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"Informational alternatives when countering"},"message":{"type":"string"}},"required":["agent_id","response"]},"ResolveResult":{"type":"object","properties":{"status":{"type":"string"},"resolved_slot":{"type":["object","null"],"additionalProperties":{}}},"required":["status","resolved_slot"]},"CancelResult":{"type":"object","properties":{"status":{"type":"string"}},"required":["status"]},"AgentSignUpBody":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"agent@example.com"},"agent_name":{"type":"string","minLength":1,"maxLength":100,"example":"Support Agent"},"tos_version":{"type":"string","minLength":1,"example":"2026-05-11"}},"required":["email","agent_name","tos_version"]},"AgentSignUpNewOrgResponse":{"type":"object","properties":{"org_id":{"type":"string","example":"org_a1b2c3d4-e5f6-7890-1234-567890abcdef"},"agent_id":{"type":"string","example":"agt_abcd1234xyz0"},"api_key":{"type":"string","example":"chr_sk_..."},"message":{"type":"string","example":"Verification code sent to email"}},"required":["org_id","agent_id","api_key","message"]},"AgentSignUpOpaqueResponse":{"type":"object","properties":{"message":{"type":"string","example":"Verification code sent to email"}},"required":["message"]},"AgentVerifyBody":{"type":"object","properties":{"otp":{"type":"string","minLength":6,"maxLength":6,"pattern":"^\\d+$","example":"123456"}},"required":["otp"]},"AgentVerifyResponse":{"type":"object","properties":{"verified":{"type":"boolean","enum":[true],"example":true},"message":{"type":"string","example":"Full access unlocked"}},"required":["verified","message"]},"WaitlistJoinRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"dev@acme.ai"},"name":{"type":"string","minLength":2,"maxLength":100,"example":"Acme AI"},"tos_version":{"type":"string","minLength":1,"example":"2026-05-11"},"intent":{"type":"string","maxLength":200,"example":"Building an AI scheduling agent for sales teams.","description":"\"What are you building?\" — free-text, capped at 200 chars."}},"required":["email"]},"WaitlistEntry":{"type":"object","properties":{"id":{"type":"string","example":"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"},"email":{"type":"string","format":"email","example":"dev@acme.ai"},"intent":{"type":["string","null"],"example":"Building an AI scheduling agent."},"status":{"type":"string","example":"pending"},"created_at":{"type":"string","example":"2026-05-09T12:00:00.000Z"}},"required":["id","email","intent","status","created_at"]},"WaitlistJoinResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WaitlistEntry"},"message":{"type":"string","example":"You're on the list. Check your email for a confirmation."}},"required":["data","message"]},"CapacityResponse":{"type":"object","properties":{"percent_full":{"type":"integer","minimum":0,"maximum":100,"example":42,"description":"Percent of soft-launch slots currently occupied. 0–100."},"status":{"type":"string","enum":["open","full"],"example":"open","description":"`open` when new auto-approvals are accepted; `full` when at capacity."}},"required":["percent_full","status"]},"InviteVerifyResponse":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"dev@acme.ai"},"expires_at":{"type":"string","example":"2026-05-22T12:00:00.000Z"}},"required":["email","expires_at"]},"InviteClaimRequest":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":4096,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.…"}},"required":["token"]},"InviteClaimResponse":{"type":"object","properties":{"org_id":{"type":"string","example":"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"},"agent_id":{"type":"string","example":"agt_abc123"},"api_key":{"type":"string","example":"chr_sk_…"},"plan":{"type":"string","enum":["pro"],"example":"pro"},"plan_expires_at":{"type":["string","null"],"example":"2026-12-01T00:00:00.000Z"}},"required":["org_id","agent_id","api_key","plan","plan_expires_at"]},"CreateFeedback":{"type":"object","properties":{"type":{"type":"string","enum":["bug","feature","friction"],"example":"bug"},"message":{"type":"string","minLength":10,"maxLength":2000,"example":"The availability endpoint returns empty slots when timezone is UTC+13."},"context":{"type":"object","additionalProperties":{},"example":{"sdk_name":"chronary-python","sdk_version":"0.4.2","endpoint":"GET /v1/availability"}}},"required":["type","message"]},"FeedbackAccepted":{"type":"object","properties":{"status":{"type":"string","enum":["accepted"],"example":"accepted"}},"required":["status"]},"Plan":{"type":"object","properties":{"id":{"type":"string","enum":["free","pro","custom"]},"name":{"type":"string","example":"Pro"},"tagline":{"type":"string","example":"For production agent workflows"},"price":{"type":["integer","null"],"description":"Recurring monthly amount in the smallest currency unit (e.g. USD cents). `null` for the custom-priced tier.","example":2900},"currency":{"type":["string","null"],"description":"Lowercase ISO-4217 code. `null` for the custom-priced tier.","example":"usd"},"limits":{"$ref":"#/components/schemas/PlanLimits"},"display_features":{"type":"array","items":{"type":"string"},"description":"Marketing copy for UI rendering. Not machine-readable — use `limits` for capability checks."},"recommended":{"type":"boolean","description":"Hint for UIs to highlight one tier (currently `pro`)."},"custom_pricing":{"type":"boolean","description":"Present and `true` for the custom tier."},"contact_url":{"type":"string","description":"Sales contact URL for the custom-priced tier."}},"required":["id","name","tagline","price","currency","limits","display_features","recommended"]},"PlanLimits":{"type":["object","null"],"properties":{"agents":{"type":["integer","null"]},"calendars":{"type":["integer","null"]},"events":{"type":["integer","null"]},"api_calls":{"type":["integer","null"]},"webhook_deliveries":{"type":["integer","null"]},"availability_queries":{"type":["integer","null"]},"ical_subscriptions":{"type":["integer","null"]},"proposals":{"type":["integer","null"]}},"required":["agents","calendars","events","api_calls","webhook_deliveries","availability_queries","ical_subscriptions","proposals"],"description":"Enforced caps. `null` for the custom-priced tier (negotiated separately)."},"ICalSyncQueued":{"type":"object","properties":{"status":{"type":"string","enum":["syncing"],"example":"syncing"}},"required":["status"]}},"parameters":{}},"paths":{"/health":{"get":{"summary":"Health check","description":"Returns the current server status. Does not require authentication.","tags":["System"],"security":[],"responses":{"200":{"description":"Server is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"],"example":"ok"},"ts":{"type":"string","format":"date-time","example":"2025-01-15T10:00:00.000Z"}},"required":["status","ts"]}}}}}}},"/v1/plans":{"get":{"summary":"List plans","description":"Returns the catalog of publicly-available plans with pricing, limits, and display metadata. No authentication required; IP-rate-limited. Responses are cacheable (`Cache-Control: public, max-age=300, s-maxage=3600, stale-while-revalidate=86400`) with an `ETag` for 304 conditional requests.","tags":["Plans"],"security":[],"responses":{"200":{"description":"Plan catalog","content":{"application/json":{"schema":{"type":"object","properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}}},"required":["plans"]}}}},"304":{"description":"ETag matched — no body"}}}},"/v1/auth/terms/current":{"get":{"summary":"Get current Terms of Service version","description":"Returns the latest ToS manifest entry. No authentication required — intended for CLIs, SDKs, and agent-signup flows that need to read the current version at runtime rather than rely on a build-time constant.","tags":["Terms"],"security":[],"responses":{"200":{"description":"Current ToS manifest entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermsVersion"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/terms":{"patch":{"summary":"Accept the current Terms of Service","description":"Appends an immutable row to `tos_acceptances` (source=`reaccept`) capturing the accepting org, client IP, user-agent, and the ToS document SHA-256, then updates the denormalized `accepted_terms_version` / `accepted_terms_at` columns on the organization. Authenticated via JWT (console session cookie or Bearer token), not an API key.","tags":["Terms"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReacceptRequest"}}}},"responses":{"200":{"description":"Re-acceptance recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReacceptResponse"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ToS version stale — the submitted `tos_version` does not match `CURRENT_TERMS_VERSION`. Response body includes a `current_version` field on the `error` object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/export":{"get":{"summary":"Export all account data (GDPR Art. 15 + 20 portability)","description":"Returns a JSON dump of every row this org owns: agents, calendars, events (with decrypted titles + descriptions), iCal subscriptions (with decrypted URL), webhook subscriptions (with decrypted secret), availability rules, scheduling proposals + slots + responses, API key prefixes, ToS acceptance history, and usage/quota counters. Internal infrastructure data (incident_records, scheduling internals, password/OTP/key hashes, claim tokens) is excluded. JWT-authenticated (console session cookie or Bearer token). Rate-limited to 10 exports/hour/org. Response includes `Cache-Control: no-store` and `Content-Disposition: attachment` so the browser triggers a download.","tags":["Account"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Full account data export","headers":{"Content-Disposition":{"schema":{"type":"string"},"description":"attachment; filename=\"chronary-export-YYYY-MM-DD.json\""},"Cache-Control":{"schema":{"type":"string"},"description":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExport"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/claim/initiate":{"post":{"summary":"Start an account claim","description":"Initiates a claim of an agent-created Chronary account. Requires console JWT auth. Returns the same opaque shape regardless of whether the target email maps to a claimable account — by design, to prevent enumeration. Sends a 6-digit OTP to the target inbox; pair with `POST /v1/auth/claim/verify` within 10 minutes.","tags":["Account claim"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimInitiateRequest"}}}},"responses":{"200":{"description":"Opaque success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimInitiateResponse"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/claim/verify":{"post":{"summary":"Verify an account claim OTP","description":"Verifies the OTP for a pending claim. Requires console JWT auth with `iat` within the last 5 minutes — older sessions return 401 `reauth_required`. On success the claim enters a 24h revocation hold; the original account holder can revoke from the notification email during that window. After 24h a cron promotes the claim and transfers all org-scoped resources.","tags":["Account claim"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimVerifyRequest"}}}},"responses":{"200":{"description":"Claim entered the 24h hold","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimVerifyResponse"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/claim/{id}/revoke":{"post":{"summary":"Revoke a verified claim during the hold window","description":"Public endpoint — authenticates by the `revocation_token` mailed to the agent-org email at verify time. Allowed only while the claim is in `verified` state and the 24h window is still open. Returns 410 once the window closes.","tags":["Account claim"],"security":[],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimRevokeRequest"}}}},"responses":{"200":{"description":"Claim revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimRevokeResponse"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Revocation window has closed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimRevokeResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/claims":{"get":{"summary":"List your account claims","description":"Returns the developer's pending and historical claims, most recent first. Sanitized — never includes OTP hashes, revocation tokens, or full target emails.","tags":["Account claim"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"List of claims","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimsListResponse"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ical/{ical_token}":{"get":{"summary":"Get iCal feed","description":"Returns a calendar's events in iCalendar (RFC 5545) format. No authentication required — the token in the URL acts as a capability. Responses are cached for 5 minutes and include an ETag for conditional requests.","tags":["iCal Feeds"],"security":[],"parameters":[{"schema":{"type":"string","description":"iCal feed token from the calendar `ical_token` field"},"required":true,"description":"iCal feed token from the calendar `ical_token` field","name":"ical_token","in":"path"}],"responses":{"200":{"description":"iCalendar feed","content":{"text/calendar":{"schema":{"type":"string"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents":{"get":{"summary":"List agents","tags":["Agents"],"parameters":[{"schema":{"type":"string","enum":["ai","human","resource"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","enum":["active","paused","decommissioned"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentList"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Register an agent","description":"Registers your AI agent with Chronary, creating a Chronary identity it can use to own calendars, events, and webhooks. The agent itself already exists in your system — this gives it a Chronary record.","tags":["Agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgent"}}}},"responses":{"201":{"description":"Agent registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — quota exceeded or operation not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}":{"get":{"summary":"Get an agent","tags":["Agents"],"parameters":[{"schema":{"type":"string","example":"agt_01H9X4M2P5R8T6V0","description":"Agent ID"},"required":true,"description":"Agent ID","name":"id","in":"path"}],"responses":{"200":{"description":"Agent details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update an agent","tags":["Agents"],"parameters":[{"schema":{"type":"string","example":"agt_01H9X4M2P5R8T6V0","description":"Agent ID"},"required":true,"description":"Agent ID","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgent"}}}},"responses":{"200":{"description":"Updated agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete an agent","description":"Decommissions the agent and all associated calendars and events.","tags":["Agents"],"parameters":[{"schema":{"type":"string","example":"agt_01H9X4M2P5R8T6V0","description":"Agent ID"},"required":true,"description":"Agent ID","name":"id","in":"path"}],"responses":{"204":{"description":"Agent deleted"},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{agent_id}/calendars":{"get":{"summary":"List calendars for an agent","tags":["Calendars"],"parameters":[{"schema":{"type":"string","example":"agt_01H9X4M2P5R8T6V0","description":"Agent ID"},"required":true,"description":"Agent ID","name":"agent_id","in":"path"},{"schema":{"type":"string","enum":["all"]},"required":false,"name":"include","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of calendars","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarList"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a calendar for an agent","tags":["Calendars"],"parameters":[{"schema":{"type":"string","example":"agt_01H9X4M2P5R8T6V0","description":"Agent ID"},"required":true,"description":"Agent ID","name":"agent_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCalendar"}}}},"responses":{"201":{"description":"Calendar created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calendar"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — quota exceeded or operation not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{agent_id}/events":{"get":{"summary":"List events for an agent","description":"Returns events across all calendars owned by the agent.","tags":["Events"],"parameters":[{"schema":{"type":"string","example":"agt_01H9X4M2P5R8T6V0","description":"Agent ID"},"required":true,"description":"Agent ID","name":"agent_id","in":"path"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"start_after","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"start_before","in":"query"},{"schema":{"type":"string","enum":["confirmed","tentative","cancelled","hold"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["internal","external_ical"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{id}/availability":{"get":{"summary":"Get agent availability","description":"Returns free/busy slots for all calendars owned by the agent.","tags":["Availability"],"parameters":[{"schema":{"type":"string","example":"agt_01H9X4M2P5R8T6V0","description":"Agent ID"},"required":true,"description":"Agent ID","name":"id","in":"path"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"start","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"end","in":"query"},{"schema":{"type":"string","enum":["15m","30m","45m","1h","2h"],"default":"30m"},"required":false,"name":"slot_duration","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"include_busy","in":"query"}],"responses":{"200":{"description":"Availability slots","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityResponse"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{agent_id}/ical-subscriptions":{"get":{"summary":"List iCal subscriptions for an agent","tags":["iCal Subscriptions"],"parameters":[{"schema":{"type":"string","example":"agt_01H9X4M2P5R8T6V0","description":"Agent ID"},"required":true,"description":"Agent ID","name":"agent_id","in":"path"},{"schema":{"type":"string","enum":["active","error","paused"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of iCal subscriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ICalSubscriptionList"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an iCal subscription for an agent","description":"Subscribes an agent's calendar to an external iCal feed. The feed is polled approximately every 5 minutes and events are synced into the target calendar.","tags":["iCal Subscriptions"],"parameters":[{"schema":{"type":"string","example":"agt_01H9X4M2P5R8T6V0","description":"Agent ID"},"required":true,"description":"Agent ID","name":"agent_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateICalSubscription"}}}},"responses":{"201":{"description":"Subscription created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ICalSubscription"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — quota exceeded or operation not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/calendars":{"get":{"summary":"List calendars","description":"By default, returns only agent-owned calendars. Pass `include=all` to include shared org-level calendars.","tags":["Calendars"],"parameters":[{"schema":{"type":"string","enum":["all"]},"required":false,"name":"include","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of calendars","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarList"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a calendar","description":"Creates a shared (org-level) calendar not associated with any specific agent.","tags":["Calendars"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCalendar"}}}},"responses":{"201":{"description":"Calendar created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calendar"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — quota exceeded or operation not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/calendars/{id}":{"get":{"summary":"Get a calendar","tags":["Calendars"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"id","in":"path"}],"responses":{"200":{"description":"Calendar details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calendar"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a calendar","tags":["Calendars"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCalendar"}}}},"responses":{"200":{"description":"Updated calendar","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calendar"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a calendar","description":"Deletes a calendar and all its events.","tags":["Calendars"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"id","in":"path"}],"responses":{"204":{"description":"Calendar deleted"},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/calendars/{id}/context":{"get":{"summary":"Get calendar temporal context","description":"Returns a snapshot of the calendar's temporal state: current event, next event, recent events, and upcoming events within 24 hours. Designed for agents that need situational awareness of a calendar.","tags":["Calendars"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"id","in":"path"}],"responses":{"200":{"description":"Calendar temporal context","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarContext"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/calendars/{cal_id}/events":{"get":{"summary":"List events in a calendar","tags":["Events"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"cal_id","in":"path"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"start_after","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"start_before","in":"query"},{"schema":{"type":"string","enum":["confirmed","tentative","cancelled","hold"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["internal","external_ical"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an event in a calendar","description":"Create a confirmed event, a tentative event, or a temporal hold. When creating a hold (`status: \"hold\"`), `hold_expires_at` is required and must be between 30 seconds and 15 minutes in the future. Holds auto-release at `hold_expires_at`; promote a hold to a confirmed event with `PUT /v1/events/{id}/confirm` before expiry.","tags":["Events"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"cal_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEvent"}}}},"responses":{"201":{"description":"Event created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — quota exceeded or operation not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/calendars/{cal_id}/events/{id}":{"get":{"summary":"Get a cal-scoped event","tags":["Events"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"cal_id","in":"path"},{"schema":{"type":"string","example":"evt_01H9X4M2P5R8T6V0","description":"Event ID"},"required":true,"description":"Event ID","name":"id","in":"path"}],"responses":{"200":{"description":"Event details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a cal-scoped event","tags":["Events"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"cal_id","in":"path"},{"schema":{"type":"string","example":"evt_01H9X4M2P5R8T6V0","description":"Event ID"},"required":true,"description":"Event ID","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEvent"}}}},"responses":{"200":{"description":"Updated event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a cal-scoped event","tags":["Events"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"cal_id","in":"path"},{"schema":{"type":"string","example":"evt_01H9X4M2P5R8T6V0","description":"Event ID"},"required":true,"description":"Event ID","name":"id","in":"path"}],"responses":{"204":{"description":"Event deleted"},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/calendars/{id}/availability":{"get":{"summary":"Get calendar availability","description":"Returns free/busy slots for a single calendar.","tags":["Availability"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"id","in":"path"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"start","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"end","in":"query"},{"schema":{"type":"string","enum":["15m","30m","45m","1h","2h"],"default":"30m"},"required":false,"name":"slot_duration","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"include_busy","in":"query"}],"responses":{"200":{"description":"Availability slots","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityResponse"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/calendars/{id}/availability-rules":{"put":{"summary":"Set availability rules","description":"Upsert buffer times and working hours for a calendar.","tags":["Availability"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAvailabilityRules"}}}},"responses":{"200":{"description":"Availability rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityRules"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Get availability rules","description":"Returns the buffer and working hours rules for a calendar.","tags":["Availability"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"id","in":"path"}],"responses":{"200":{"description":"Availability rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityRules"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete availability rules","description":"Removes buffer times and working hours for a calendar.","tags":["Availability"],"parameters":[{"schema":{"type":"string","example":"cal_01H9X4M2P5R8T6V0","description":"Calendar ID"},"required":true,"description":"Calendar ID","name":"id","in":"path"}],"responses":{"204":{"description":"Rules deleted"},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events/{id}/confirm":{"put":{"summary":"Confirm a held event","description":"Promotes an event from `status=\"hold\"` to `status=\"confirmed\"`. The hold must still be active (not past `hold_expires_at`). After confirmation, `event.started` and `event.ended` lifecycle webhooks fire at the scheduled times, and the `event.hold_confirmed` webhook fires immediately.","tags":["Events"],"parameters":[{"schema":{"type":"string","example":"evt_01H9X4M2P5R8T6V0","description":"Event ID"},"required":true,"description":"Event ID","name":"id","in":"path"}],"responses":{"200":{"description":"Confirmed event","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"External iCal events cannot be confirmed, or Pro plan required","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Event is not a hold, or the hold has already expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/events/{id}/release":{"put":{"summary":"Release a held event","description":"Manually releases an event with `status=\"hold\"` before its `hold_expires_at`. Frees the slot for other agents. Fires the `event.hold_released` webhook. **Requires Pro plan.**","tags":["Events"],"parameters":[{"schema":{"type":"string","example":"evt_01H9X4M2P5R8T6V0","description":"Event ID"},"required":true,"description":"Event ID","name":"id","in":"path"}],"responses":{"200":{"description":"Released event (now cancelled)","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"External iCal events cannot be released, or Pro plan required","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Event is not a hold","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/availability":{"get":{"summary":"Get cross-agent availability","description":"Returns intersected free/busy slots across multiple agents. Pass a comma-separated list of agent IDs in the `agents` query parameter. Optionally filter to specific calendar IDs with `calendars`. **Requires Pro plan.**","tags":["Availability"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"agents","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"start","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"end","in":"query"},{"schema":{"type":"string","enum":["15m","30m","45m","1h","2h"],"default":"30m"},"required":false,"name":"slot_duration","in":"query"},{"schema":{"type":"string"},"required":false,"name":"calendars","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"include_busy","in":"query"}],"responses":{"200":{"description":"Intersected availability slots","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityResponse"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan upgrade required — feature is not available on the current plan","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks":{"get":{"summary":"List webhooks","tags":["Webhooks"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List of webhooks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a webhook","description":"Registers a new webhook endpoint. Chronary will deliver signed POST requests to your URL when subscribed events occur. The signing secret is returned only at creation time — store it securely.","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhook"}}}},"responses":{"201":{"description":"Webhook created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — quota exceeded or operation not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}":{"get":{"summary":"Get a webhook","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","example":"whk_01H9X4M2P5R8T6V0","description":"Webhook ID"},"required":true,"description":"Webhook ID","name":"id","in":"path"}],"responses":{"200":{"description":"Webhook details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update a webhook","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","example":"whk_01H9X4M2P5R8T6V0","description":"Webhook ID"},"required":true,"description":"Webhook ID","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhook"}}}},"responses":{"200":{"description":"Updated webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a webhook","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","example":"whk_01H9X4M2P5R8T6V0","description":"Webhook ID"},"required":true,"description":"Webhook ID","name":"id","in":"path"}],"responses":{"204":{"description":"Webhook deleted"},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/webhooks/{id}/deliveries":{"get":{"summary":"List webhook deliveries","description":"Returns delivery history for a webhook subscription. Useful for diagnosing failed deliveries. Payload bodies are omitted by default — pass `include_payload=true` to include them. Requires an org-level API key; agent-scoped keys receive 403.","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","example":"whk_01H9X4M2P5R8T6V0","description":"Webhook ID"},"required":true,"description":"Webhook ID","name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","enum":["pending","delivered","failed"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"include_payload","in":"query"}],"responses":{"200":{"description":"Delivery history with pagination and all-time status counts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryList"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden — quota exceeded or operation not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ical-subscriptions/{id}":{"get":{"summary":"Get an iCal subscription","tags":["iCal Subscriptions"],"parameters":[{"schema":{"type":"string","example":"ics_01H9X4M2P5R8T6V0","description":"iCal subscription ID"},"required":true,"description":"iCal subscription ID","name":"id","in":"path"}],"responses":{"200":{"description":"iCal subscription details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ICalSubscription"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update an iCal subscription","tags":["iCal Subscriptions"],"parameters":[{"schema":{"type":"string","example":"ics_01H9X4M2P5R8T6V0","description":"iCal subscription ID"},"required":true,"description":"iCal subscription ID","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateICalSubscription"}}}},"responses":{"200":{"description":"Updated iCal subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ICalSubscription"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete an iCal subscription","tags":["iCal Subscriptions"],"parameters":[{"schema":{"type":"string","example":"ics_01H9X4M2P5R8T6V0","description":"iCal subscription ID"},"required":true,"description":"iCal subscription ID","name":"id","in":"path"}],"responses":{"204":{"description":"iCal subscription deleted"},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ical-subscriptions/{id}/sync":{"post":{"summary":"Trigger an iCal subscription sync","description":"Queues an iCal fetch-and-merge for the subscription. Returns 202 immediately with a status envelope; the actual sync completes asynchronously.","tags":["iCal Subscriptions"],"parameters":[{"schema":{"type":"string","example":"ics_01H9X4M2P5R8T6V0","description":"iCal subscription ID"},"required":true,"description":"iCal subscription ID","name":"id","in":"path"}],"responses":{"202":{"description":"Sync queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ICalSyncQueued"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"summary":"Get usage and quota stats","description":"Returns current-month usage counters and plan limits for the authenticated organization.","tags":["Usage"],"responses":{"200":{"description":"Usage data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/audit-log":{"get":{"summary":"List audit-log entries","description":"Returns mutating API operations and auth lifecycle events for the calling organization, clamped to the per-tier retention window (Free: 7d, Pro: 90d, Custom: per-contract). Only org-level API keys may call this endpoint — agent-scoped keys receive 403.","tags":["Audit Log"],"parameters":[{"schema":{"type":"string","format":"date-time","description":"Lower bound (inclusive). Clamped to retention window if older.","example":"2026-05-01T00:00:00.000Z"},"required":false,"description":"Lower bound (inclusive). Clamped to retention window if older.","name":"from","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Upper bound (inclusive). Defaults to now.","example":"2026-05-11T00:00:00.000Z"},"required":false,"description":"Upper bound (inclusive). Defaults to now.","name":"to","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Filter by exact action name, e.g. `agent.create`.","example":"agent.create"},"required":false,"description":"Filter by exact action name, e.g. `agent.create`.","name":"action","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":32,"description":"Filter by the first 20 chars of the actor API key.","example":"chr_sk_abcdef12345"},"required":false,"description":"Filter by the first 20 chars of the actor API key.","name":"actor_key_prefix","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor from a previous response."},"required":false,"description":"Opaque pagination cursor from a previous response.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Page size (1–200). Defaults to 50.","example":50},"required":false,"description":"Page size (1–200). Defaults to 50.","name":"limit","in":"query"}],"responses":{"200":{"description":"Audit-log page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogResponse"}}}},"400":{"description":"Invalid query parameters"},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Agent-scoped key cannot access this resource"},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/keys":{"post":{"summary":"Create an agent-scoped API key","description":"Creates a new `chr_ak_*` key scoped to a single agent. Only org-level API keys may call this endpoint. **Requires Pro plan.**","tags":["API Keys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScopedApiKey"}}}},"responses":{"201":{"description":"Scoped API key created","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedScopedApiKey"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan upgrade required — feature is not available on the current plan","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List agent-scoped API keys","description":"Lists scoped keys for the authenticated organization. Only org-level API keys may call this endpoint. **Requires Pro plan.**","tags":["API Keys"],"responses":{"200":{"description":"Scoped API keys","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopedApiKeyList"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan upgrade required — feature is not available on the current plan","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/keys/{id}":{"delete":{"summary":"Revoke an agent-scoped API key","description":"Revokes a scoped key by id. Only org-level API keys may call this endpoint. **Requires Pro plan.**","tags":["API Keys"],"parameters":[{"schema":{"type":"string","example":"db59cb2d-5bd6-4631-84e7-c65db55ff9f9"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Scoped API key revoked","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan upgrade required — feature is not available on the current plan","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduling/proposals":{"post":{"summary":"Create a scheduling proposal","description":"Creates a new scheduling proposal with time slots. The organizer and all participants must be agents in your organization. **Requires Pro plan.**","tags":["Scheduling"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","example":"Q2 planning sync"},"description":{"type":"string","example":"Quarterly planning discussion"},"organizer_agent_id":{"type":"string","example":"agt_abc123def456"},"participant_agent_ids":{"type":"array","items":{"type":"string"},"example":["agt_abc123def456","agt_xyz789"]},"calendar_id":{"type":"string","example":"cal_abc123def456"},"slots":{"type":"array","items":{"type":"object","properties":{"start_time":{"type":"string","format":"date-time","example":"2026-05-01T10:00:00.000Z"},"end_time":{"type":"string","format":"date-time","example":"2026-05-01T11:00:00.000Z"},"weight":{"type":"number","example":1.5},"calendar_id":{"type":"string","example":"cal_abc123def456"}},"required":["start_time","end_time"]},"description":"1–20 candidate time slots"},"expires_at":{"type":"string","format":"date-time","example":"2026-05-01T00:00:00.000Z"},"metadata":{"type":"object","additionalProperties":{},"example":{}}},"required":["title","organizer_agent_id","participant_agent_ids","calendar_id","slots"]}}}},"responses":{"201":{"description":"Proposal created","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalSummary"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan upgrade required — feature is not available on the current plan","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Organizer or participant agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List scheduling proposals","tags":["Scheduling"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"example":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0,"example":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","enum":["pending","confirmed","expired","cancelled"],"example":"pending"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","example":"agt_abc123def456"},"required":false,"name":"organizer_agent_id","in":"query"}],"responses":{"200":{"description":"Proposals list","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalList"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan upgrade required — feature is not available on the current plan","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduling/proposals/{id}":{"get":{"summary":"Get a scheduling proposal","description":"Returns the proposal with its slots and all responses. **Requires Pro plan.**","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","example":"spr_abc123def456"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Proposal with slots and responses","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposal"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan upgrade required — feature is not available on the current plan","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduling/proposals/{id}/respond":{"post":{"summary":"Respond to a scheduling proposal","description":"Submit an accept, decline, or counter response. Only agents listed in participant_agent_ids may respond. Each agent may respond exactly once. If all participants have now responded, auto-resolution runs automatically. **Requires Pro plan.**","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","example":"spr_abc123def456"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondToProposalBody"}}}},"responses":{"200":{"description":"Response recorded","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalResponse"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Agent is not a participant, or Pro plan required","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Proposal is not pending, or agent already responded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduling/proposals/{id}/resolve":{"post":{"summary":"Manually resolve a scheduling proposal","description":"Runs the scoring algorithm immediately (without waiting for all participants to respond) and picks the best slot. If all existing responses are declines, the proposal is cancelled instead. **Requires Pro plan.**","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","example":"spr_abc123def456"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Resolution result","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveResult"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan upgrade required — feature is not available on the current plan","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Proposal is not in a pending state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/scheduling/proposals/{id}/cancel":{"post":{"summary":"Cancel a scheduling proposal","description":"Cancels a pending proposal. Fires a proposal.cancelled webhook. **Requires Pro plan.**","tags":["Scheduling"],"parameters":[{"schema":{"type":"string","example":"spr_abc123def456"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Proposal cancelled","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelResult"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan upgrade required — feature is not available on the current plan","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Proposal is not in a pending state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agent/sign-up":{"post":{"summary":"Agent self-signup","description":"Create an organization and restricted API key by submitting an email and the current terms-of-service version.\n\nThree server-side dedup branches — all return HTTP 200 (or 409 only for stale ToS) to block email enumeration:\n\n- **New email** → returns `org_id` + `api_key`. OTP sent to email.\n- **Duplicate unverified-agent signup with current ToS** → opaque response (no `org_id`/`api_key`). OTP rotated and re-sent.\n- **Duplicate verified / console-origin org** → opaque response. No email sent.\n- **Stale `tos_version`** (agent-origin) → 409 with `current_version` hint.\n\nThe returned key is bound to an *unverified* org. It is fully usable for reads and writes within the standard per-resource quotas, but the org cannot graduate from the introductory `free-agent-unverified` plan tier until you call `POST /v1/agent/verify` with the emailed OTP. Verification rotates the org to its normal plan (e.g. `free-agent` or — during the soft-launch window — `pro` via the auto-grant capacity gate).\n\nRate limit: 5 requests per 60 seconds per client IP.","tags":["Agent Auth"],"security":[],"x-agent-bootstrap":true,"x-agent-hint":"Call this first. Returns a restricted API key that works immediately for reads + writes. Follow up with POST /v1/agent/verify once the human reads the OTP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSignUpBody"}}}},"responses":{"200":{"description":"Sign-up accepted. New-org payload includes keys; duplicate returns the opaque shape.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AgentSignUpNewOrgResponse"},{"$ref":"#/components/schemas/AgentSignUpOpaqueResponse"}]}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Submitted tos_version is out of date. Includes current_version hint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/waitlist":{"post":{"summary":"Join the waitlist","description":"Join the Chronary soft-launch waitlist. Creates a row in the `waitlist` intake table — no\norganization is created until the prospect is approved by a founder and clicks the signed\ninvite link sent to their email.\n\nIdempotent on repeat hits: the same email returns 200 with the existing entry instead of 409.\nAn active (non-waitlisted) account at the same email returns 409 `email_taken`.\n\nRate limit: per-IP and per-email via the public rate limiter.","tags":["Waitlist"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistJoinRequest"}}}},"responses":{"200":{"description":"Email already on the waitlist; idempotent re-hit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistJoinResponse"}}}},"201":{"description":"Waitlist entry created. Confirmation email queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistJoinResponse"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"An active account already exists for this email, or `tos_version` is stale.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/capacity":{"get":{"summary":"Public soft-launch capacity gauge","description":"Returns the percentage of soft-launch slots currently occupied. Public, unauthenticated,\nIP rate-limited. Used by the marketing-site homepage to drive the capacity indicator and\nflip the CTA between \"Get early access\" (open) and \"Join waitlist\" (full).\n\nAbsolute slot counts are intentionally not exposed.\n\nAfter GA cutover the gauge is meaningless and always returns `{percent_full: 0, status: \"open\"}`.","tags":["Waitlist"],"security":[],"responses":{"200":{"description":"Current capacity gauge.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapacityResponse"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invite/verify":{"get":{"summary":"Verify a soft-launch invite token","description":"Validates a signed invite token (purpose=`invite_claim`) and returns the email + expiry\nso the console can pre-fill the claim form. Read-only — does not consume the token.\nPublic, IP+token rate-limited.","tags":["Waitlist"],"security":[],"parameters":[{"schema":{"type":"string","minLength":20,"example":"eyJhbGciOiJIUzI1NiIs…"},"required":true,"name":"token","in":"query"}],"responses":{"200":{"description":"Token is valid and entry is in `approved` state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteVerifyResponse"}}}},"400":{"description":"Token is missing or malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Entry has already been claimed or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Token has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invite/claim":{"post":{"summary":"Claim a soft-launch invite","description":"Consumes a signed invite token and provisions an active org with `plan=pro`,\n`plan_source=soft_launch_invite`, `plan_expires_at=ga_date`. Mints a live + test API key\nand transitions the waitlist entry to `claimed`.\n\nOTP is intentionally skipped — token possession (delivered to the email captured at\nintake) is the email-ownership proof. Public, IP+token rate-limited.","tags":["Waitlist"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteClaimRequest"}}}},"responses":{"201":{"description":"Org created. Live + test API keys returned (only chance to see them).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteClaimResponse"}}}},"400":{"description":"Token is missing or malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Email already has an active account, or invite already claimed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Token has expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agent/verify":{"post":{"summary":"Verify agent email OTP","description":"Promote a restricted agent key to full access by submitting the 6-digit OTP received via email.\n\nOn success the org transitions `status: unverified → verified`, the plan upgrades from `free-agent-unverified` to `free-agent`, and the key immediately gains full write access.\n\nOn any failure (wrong OTP / expired / already burned after 10 attempts / unknown org) the response is a generic 400 validation_error — no information is leaked about which precondition failed.","tags":["Agent Auth"],"x-agent-bootstrap":true,"x-agent-hint":"Submit the 6-digit OTP the human received via email. Upgrades the restricted key to the full plan tier. Returns generic 400 on any failure to prevent enumeration.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVerifyBody"}}}},"responses":{"200":{"description":"OTP verified; full access unlocked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVerifyResponse"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — 10 requests per second per key exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/feedback":{"post":{"summary":"Submit agent feedback","description":"Structured feedback for bugs, features, or friction. Logged to Chronary for triage — no DB record is created. Rate limited to **25 per day per organization** (UTC day). Available on all plans, including free.","tags":["Feedback"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFeedback"}}}},"responses":{"202":{"description":"Feedback accepted","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackAccepted"}}}},"400":{"description":"Validation error — invalid request body or query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized — missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily feedback limit reached","headers":{"X-Chronary-Plan":{"description":"The current plan of the authenticated organization (free | pro | scale)","schema":{"type":"string","enum":["free","pro","scale"]}},"Retry-After":{"description":"Seconds until the daily feedback quota resets (next UTC midnight)","schema":{"type":"string","example":"43200"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{},"x-agent-self-signup":{"url":"https://api.chronary.ai/v1/agent/sign-up","verify_url":"https://api.chronary.ai/v1/agent/verify","restricted_key_returned":true,"human_in_the_loop":"otp_email","rate_limit":"5 requests per 60s per client IP"},"x-agent-bootstrap-script":{"npx":"npx @chronary/agent-init@latest","shell":"https://chronary.ai/agent-init.sh","description":"One-liner that performs sign-up, prompts for OTP, verifies, and creates a smoke calendar. Accepts CHRONARY_EMAIL and CHRONARY_OTP env vars for non-interactive flows."},"x-llms-txt":"https://docs.chronary.ai/llms.txt","x-llms-full-txt":"https://docs.chronary.ai/llms-full.txt","x-mcp-server-card":"https://chronary.ai/.well-known/mcp/server-card.json","x-api-catalog":"https://chronary.ai/.well-known/api-catalog"}