# iCalendar API
> Build a valid RFC 5545 iCalendar (.ics) event from simple parameters — and get ready-to-use "add to calendar" links for Google, Outlook, Office 365 and Yahoo. Pass a title, start and end (ISO 8601 or unix timestamps, in UTC) — or a duration in minutes, or an all-day flag — plus optional location, description, URL, organizer, an RRULE recurrence (e.g. FREQ=WEEKLY) and a reminder (a VALARM N minutes before). The service returns the fully-formed .ics text with correct escaping and 75-octet line folding, a base64 data: URI you can drop straight into a download link, and the four calendar deep-links. A second endpoint parses raw .ics text back into structured JSON events. Everything is computed locally with no network calls, so it is fast and deterministic. Built for booking and scheduling flows, event pages, email "add to calendar" buttons, reminders and no-code automations. A calendar-event builder — distinct from date/time math (datetime), public-holiday data (holidays) and the Jewish calendar (hebcal). No upstream key, no cache.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/ical-api/..."
```

## Pricing
- **Free** (Free) — 2,280 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 45,000 calls/Mo, 8 req/s
- **Pro** ($21/Mo) — 232,000 calls/Mo, 20 req/s
- **Mega** ($56/Mo) — 860,000 calls/Mo, 50 req/s

## Endpoints

### iCalendar

#### `GET /v1/event` — Build an .ics event + calendar links

**Parameters:**
- `title` (query, required, string) — Event title Example: `Team Meeting`
- `start` (query, required, string) — Start (ISO 8601 / unix) Example: `2026-07-01T10:00:00Z`
- `end` (query, optional, string) — End (or use duration) Example: `2026-07-01T11:00:00Z`
- `duration` (query, optional, string) — Minutes (if no end)
- `location` (query, optional, string) — Location
- `description` (query, optional, string) — Description
- `rrule` (query, optional, string) — Recurrence (FREQ=WEEKLY…)
- `reminder` (query, optional, string) — VALARM minutes before
- `all_day` (query, optional, string) — true for date-only

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ical-api/v1/event?title=Team+Meeting&start=2026-07-01T10%3A00%3A00Z&end=2026-07-01T11%3A00%3A00Z"
```

**Response:**
```json
{
    "data": {
        "ics": "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//oanor//iCal API//EN\r\nCALSCALE:GREGORIAN\r\nMETHOD:PUBLISH\r\nBEGIN:VEVENT\r\nUID:1lou9mf-20260701T100000Z@oanor.dev\r\nDTSTAMP:20260601T234048Z\r\nDTSTART:20260701T100000Z\r\nDTEND:20260701T110000Z\r\nSUMMARY:Team Meeting\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n",
        "event": {
            "end": "2026-07-01T11:00:00.000Z",
            "rrule": null,
            "start": "2026-07-01T10:00:00.000Z",
            "title": "Team Meeting",
            "all_day": false,
            "location": null,
            "description": null,
            "reminder_minutes": null
        },
        "links": {
            "yahoo": "https://calendar.yahoo.com/?v=60&title=Team%20Meeting&st=20260701T100000Z&dur=0100",
            "google": "https://calendar.google.com/calendar/render?action=TEMPLATE&text=Team%20Meeting&dates=20260701T100000Z/20260701T110000Z",
            "outlook": "https://outlook.live.com/calendar/0/deeplink/compose?subject=Team%20Meeting&startdt=2026-07-01T10%3A00%3A00.000Z&enddt=2026-07-01T11%3A00%3A00.000Z&path=/calendar/action/compose",
            "office365": "https://outlook.office.com/calendar/0/deeplink/compose?subject=Team%20Meeting&startdt=2026-07-01T10%3A00%3A00.000Z&enddt=2026-07-01T11%3A00%3A00.000Z&path=/calendar/action/compose"
        },
        "data_uri": "data:text/calendar;charset=utf-8;base64,QkVHSU46VkNBTEVOREFSDQpWRVJTSU9OOjIuMA0KUFJPRElEOi0vL29hbm9yLy9pQ2FsIEFQSS8vRU4NCkNBTFNDQ
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/parse` — Parse .ics into JSON events

**Parameters:**
- `ics` (query, required, string) — Raw .ics text Example: `BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
SUMMARY:Sample Event
DTSTART:20260701T100000Z
DTEND:20260701T110000Z
LOCATION:Online
END:VEVENT
END:VCALENDAR`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ical-api/v1/parse?ics=BEGIN%3AVCALENDAR%0AVERSION%3A2.0%0ABEGIN%3AVEVENT%0ASUMMARY%3ASample+Event%0ADTSTART%3A20260701T100000Z%0ADTEND%3A20260701T110000Z%0ALOCATION%3AOnline%0AEND%3AVEVENT%0AEND%3AVCALENDAR"
```

**Response:**
```json
{
    "data": {
        "events": [
            {
                "end": "20260701T110000Z",
                "start": "20260701T100000Z",
                "title": "Sample Event",
                "location": "Online"
            }
        ],
        "event_count": 1
    },
    "meta": {
        "timestamp": "2026-06-01T23:40:48.285Z",
        "request_id": "d2de02a2-64d8-4c12-8e77-38d93b3db6e9"
    },
    "status": "ok",
    "message": "iCalendar parsed",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec & calendar links

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ical-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Build a valid RFC 5545 iCalendar event from simple parameters, or parse an .ics file back into structured events. /v1/event?title=Standup&start=2026-07-01T10:00:00Z&end=...&location=...&description=...&rrule=FREQ=WEEKLY returns the ready-to-serve .ics text (with proper escaping, 75-octet line folding, an optional VALARM reminder and RRULE recurrence), a base64 data: URI usable directly as a download link, and 'add to calendar' deep-links for Google, Outlook, Office 365 and Yahoo. Pass start/end as ISO 8601 or unix timestamps (UTC), or use duration (minutes) instead of end, or all_day for date-only events. /v1/parse turns raw .ics text (inline or in the body) back into JSON events. Everything is computed locally with no network calls. Ideal for booking and scheduling flows, event pages, email 'add to calendar' buttons, reminders and no-code automations. A calendar-event builder — distinct from date/time math (datetime), public-holiday data (holidays) and the Jewish calendar (hebcal). No key, no cache.",
        "spec": "RFC 5545 (iCalendar)",
        "endpoints": [
            "/v1/event",
            "/v1/parse",
            "/v1/meta"
        ],
        "calendar_links": [
            "google",
            "outlook",
            "office365",
            "yahoo"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T23:40:48.378Z",
        "request_id": "2579b11a-57a9-4a9e-8e61-00ca5f880bdb"
    },
    "status": "ok",
    "message":
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/ical-api
OpenAPI spec: https://www.oanor.com/api/ical-api/openapi.json
