CorrectICS

CorrectICS API

Validate and inspect .ics (iCalendar) files using simple HTTP endpoints. You can self-host the documentation via the OpenAPI spec or start with the examples below.

Base URL: https://api.correctics.com

Download OpenAPI 3.0 Spec Try the Web Tool

Quickstart

Quickstart (cURL)

curl -X POST https://api.correctics.com/api/validate \
  -H "Authorization: Bearer <API_KEY>" \
+  -H "Content-Type: text/calendar" \
  --data-binary @calendar.ics

JavaScript (fetch)

const body = /* string or Buffer of file contents */ '';

const res = await fetch('https://api.correctics.com/api/validate', {
  method: 'POST',
  headers: {
    'Content-Type': 'text/calendar',
    'Authorization': 'Bearer <API_KEY>',
  },
  body,
});
const data = await res.json();

Python (requests)

import requests
headers = {
  'Content-Type': 'text/calendar',
    'Authorization': 'Bearer <API_KEY>',
}
data = open('calendar.ics','rb').read()
r = requests.post('https://api.correctics.com/api/validate', data=data, headers=headers)
print(r.json())

Common behaviour

  • Free tier rate limit: 5 requests/minute per IP, enforced via Durable Object.
  • All responses include X-Request-Id — reference it if you contact support.
  • Validation failures return HTTP 422 with stage, errors[], and warnings[].
  • Rate limit breaches return HTTP 429 with Retry-After, X-RateLimit-Limit, and X-RateLimit-Remaining.
  • ICS payloads are processed in memory and not persisted; logs only retain request metadata.

POST /api/validate

Validate a single ICS payload supplied as text/calendar or text/plain, or upload via multipart/form-data using a file field. Add query params or headers to enable autofix behaviour.

Query Description
policy Validation profile (rfc default, or google, outlook, apple).
autofix 1 enables safe autofixes (insert VERSION, UID, etc.).
uid_host Domain suffix used when generating UIDs during autofix.
Header Description
x-correctics-autofix Alternate way to enable autofixes.
x-correctics-uid-host Alternate way to specify UID host.
x-correctics-clock ISO timestamp for deterministic autofix values.
curl -X POST https://api.correctics.com/api/validate \
  -H "Content-Type: text/plain" \
  --data-binary @calendar.ics
Example 200 response
{
  "ok": true,
  "stage": "rules",
  "policy": "rfc",
  "errors": [],
  "warnings": []
}
Example 422 response
{
  "ok": false,
  "stage": "rules",
  "policy": "rfc",
  "errors": [
    { "code": "RFC.EVENT.DTSTART_MISSING", "severity": "fatal", "message": "VEVENT is missing DTSTART" }
  ],
  "warnings": []
}

POST /api/validate-bulk

Validate multiple ICS files by uploading a ZIP archive. The same query params/headers as the single endpoint apply to every file.

  • Maximum 50 files per archive.
  • Maximum 5 MiB total uncompressed size.
  • Only entries ending in .ics are processed (others ignored).
zip calendars.zip a.ics b.ics
curl -X POST https://api.correctics.com/api/validate-bulk \
  -H "Content-Type: application/zip" \
  --data-binary @calendars.zip

The response aggregates per-file results:

{
  "ok": false,
  "stage": "bulk",
  "counts": { "total": 2, "ok": 1, "failed": 1 },
  "files": [
    { "name": "a.ics", "status": 200, "result": { "ok": true, "errors": [] } },
    { "name": "b.ics", "status": 422, "result": { "ok": false, "errors": [{ "code": "RFC.VERSION.MISSING" }] } }
  ]
}

Error reference

Status Meaning Notes
200 Validation succeeded Warnings may still be present.
422 Validation failed See stage, errors[], warnings[].
400 Invalid bulk archive ZIP could not be parsed.
413 Bulk limit exceeded Too many files or >5 MiB uncompressed.
429 Rate limit reached Respect Retry-After before retrying.
500 Internal error Retry and include X-Request-Id if reporting.

Engineering notes

Short notes on iCalendar edge cases, RFC interpretation, and real-world calendar interoperability.

View notes

Next steps

Higher plan limits, API keys, and webhook integrations are on the roadmap. Submit issues and requests on the repo for updates or drop us a note via the contact form.

OpenAPI (machine-readable): /docs/openapi.yaml