---
title: "Create an iCal subscription for an agent"
method: POST
path: "/v1/agents/{agent_id}/ical-subscriptions"
tags: ["iCal Subscriptions"]
---

# Create an iCal subscription for an agent

`POST /v1/agents/{agent_id}/ical-subscriptions`

## Request

- Base URL: `https://api.chronary.ai`
- URL: `https://api.chronary.ai/v1/agents/{agent_id}/ical-subscriptions`
- Auth: HTTP bearer

Subscribes an agent's calendar to an external iCal feed. The feed is polled approximately every 15 minutes and events are synced into the target calendar.

## Path parameters

- `agent_id` string, required: Agent ID

## Request body

- CreateICalSubscription
  - `calendar_id` string, required
  - `url` string, uri, required
  - `label` string

## Response `201`

Subscription created

- ICalSubscription
  - `id` string, required
  - `agent_id` string, required
  - `calendar_id` string, required
  - `url` string, uri, required
  - `label` string, nullable, required
  - `status` 'active' | 'error' | 'paused', required
  - `last_synced_at` string, date-time, nullable, required
  - `last_error` string, nullable, required
  - `created_at` string, date-time, required

## Other responses

- `400`: Validation error — invalid request body or query parameters
- `401`: Unauthorized — missing or invalid API key
- `403`: Forbidden — quota exceeded or operation not permitted
- `404`: Resource not found
- `429`: Rate limited — 10 requests per second per key exceeded
- `500`: Internal server error

---

[API](https://skmtc.dev/chronary/apis/chronary-api.md) · [All operations](https://skmtc.dev/chronary/apis/chronary-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chronary/apis/chronary-api/revisions/0d1a330294ae?raw)
