API Reference

The BlendedCal REST API lets you build integrations, automate workflows, and manage your calendars programmatically.

Interactive Documentation:

For a full interactive API explorer with live testing, visit:

Open Swagger UI →

Authentication

The BlendedCal API supports two authentication methods:

1. Bearer Token (Recommended for Apps & Scripts)

Bearer tokens are API keys you generate from your profile page. They're perfect for mobile apps, scripts, and third-party integrations.

How to create an API key:

  1. Log into BlendedCal
  2. Go to Profile → API Keys
  3. Click Generate API Key
  4. Give it a name (e.g., "iOS App", "Python Script")
  5. Select permissions (read-only or read/write for each resource type)
  6. Optionally set an expiration date
  7. Click Create and copy the token

Using the token:

curl https://blendedcal.com/api/sources \
  -H "Authorization: Bearer YOUR_API_KEY"

Security: Treat API keys like passwords. Don't commit them to version control or share them publicly. If a key is compromised, delete it from your profile page immediately.

2. Session Cookie (For Swagger UI and Web Usage)

When you're logged into the BlendedCal web app, your session cookie automatically authenticates API requests. This is how the Swagger UI works.

Token Permissions

When creating an API key, you can grant specific permissions:

PermissionWhat It Allows
sources:readList and view calendar sources
sources:writeCreate, update, delete, and sync sources
calendars:readList and view blended calendars
calendars:writeCreate, update, and delete blended calendars
events:readList and view events
events:writeCreate, update, and delete events
tags:readList all tags
profile:readView user profile
profile:writeUpdate user profile (name, slug)

Tip: Use read-only permissions for apps that only need to display data. Reserve write permissions for scripts and integrations that need to modify data.

API Endpoints

All endpoints are relative to https://blendedcal.com/api (or your deployment URL).

Sources

MethodEndpointDescription
GET/sourcesList all calendar sources
POST/sourcesCreate a new calendar source
GET/sources/:idGet a specific source
PATCH/sources/:idUpdate a source
DELETE/sources/:idDelete a source
POST/sources/:id/syncManually trigger sync for a source

Calendars

MethodEndpointDescription
GET/calendarsList all blended calendars
POST/calendarsCreate a new calendar
GET/calendars/:idGet a specific calendar
PATCH/calendars/:idUpdate a calendar
DELETE/calendars/:idDelete a calendar
GET/calendars/:id/eventsGet filtered events for a calendar

Events

MethodEndpointDescription
GET/eventsList all events with optional filtering
POST/eventsCreate a new event (direct/virtual)
GET/events/:idGet a single event
PATCH/events/:idUpdate an event
DELETE/events/:idDelete an event

Other Endpoints

MethodEndpointDescription
GET/tagsList all unique tags
GET/meGet current user profile
PATCH/meUpdate profile (name, slug)

Request and Response Format

Request Body

All POST and PATCH requests should include a JSON body with Content-Type: application/json.

Success Response

{
  "data": { ... },
  "total": 42  // Only for list endpoints
}

Error Response

{
  "error": "Error message",
  "details": "Additional error details (optional)"
}

Error Codes

CodeMeaning
400Bad Request (validation error, invalid input)
401Unauthorized (missing or invalid token)
404Not Found (resource doesn't exist)
500Internal Server Error (sync failures, etc.)

Example Requests

List All Sources

curl https://blendedcal.com/api/sources \
  -H "Authorization: Bearer YOUR_API_KEY"

Create a Source

curl -X POST https://blendedcal.com/api/sources \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Carter Soccer",
    "url": "https://teamsnap.com/calendar/ics/...",
    "tags": ["carter", "sports", "soccer"],
    "filterText": "game",
    "isActive": true
  }'

Get Filtered Events

curl "https://blendedcal.com/api/events?startAfter=2024-03-01T00:00:00Z&limit=20&search=game" \
  -H "Authorization: Bearer YOUR_API_KEY"

Create a Blended Calendar

curl -X POST https://blendedcal.com/api/calendars \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Carter Schedule",
    "slug": "carter",
    "description": "All of Carter'''s events",
    "meta": {
      "anyTags": ["carter"],
      "filterText": null
    }
  }'

Rate Limiting

Currently, there is no rate limiting implemented. Please be respectful and avoid excessive requests. Rate limiting may be added in future versions.

Want More?

For full interactive documentation with live testing:

Open Swagger UI →

Or connect AI assistants via MCP:

Learn about MCP Integration →