Create a calendar feed
Platform module
POST/calendar-feedscalendarFeeds.create
Creates an iCalendar feed of the caller's schedule, optionally for one project, through `app.create_calendar_feed`. The token of the subscription URL is returned once. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
- Requires the capability me.calendar_feeds.write.
- OAuth scopes: me.
- Send an Idempotency-Key header. A replay with the same key returns the original response.
- Error statuses: 400, 401, 409, 422, 429. Errors are RFC 9457 problem details.
Request body: CalendarFeedCreate
| Field | Type | Required | Description |
|---|---|---|---|
| project_id | string (uuid) | null | No | Identifier of the project. |
{
"project_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
}Response 201: CalendarFeedToken
| Field | Type | Required | Description |
|---|---|---|---|
| calendar_feed_id | string (uuid) | Yes | Identifier of the calendar feed. |
| feed_token | string | Yes | The token of the feed's subscription URL. Shown once; only its hash is stored, and revoking the feed ends it.Constraints: length 1 to any |
{
"calendar_feed_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"feed_token": "cal_9fQ2mX4vT7kL1pR8"
}Code samples
curl -X POST "$XOS_BASE_URL/calendar-feeds" \
-H "Authorization: Bearer $XOS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"project_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"}'const { data } = await xos.calendarFeeds.create({
"project_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
});response = xos.calendar_feeds.create({"project_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"})xos calendar-feeds create --data '{"project_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"}'