API Reference

CalendarSync API

Integrate CalendarSync into your own apps, automations, and workflows using our REST API. Available on all plans.

What can you build?

Real workflows that teams use the CalendarSync API for.

Trigger syncs from automations

Connect CalendarSync to Zapier or Make. When a new booking lands in your CRM, fire an API call to force-sync immediately — no waiting for the next poll cycle.

POST /api/v1/sync-pairs/{id}/trigger

Custom booking forms

Running your own booking page alongside Calendly? After each form submission, call the API to push the new event across all your calendars within seconds.

POST /api/v1/sync-pairs/{id}/trigger

Onboard employees at scale

IT admins can script bulk sync-pair creation when onboarding new staff. Connect every new hire's work and personal calendar automatically via API.

POST /api/v1/sync-pairs

Sync health monitoring

Pull sync logs via API and pipe them into Datadog, Grafana, or Slack. Alert your team if a calendar hasn't synced in over 15 minutes.

GET /api/v1/logs?pair_id={id}

Pause syncs during maintenance

Deploying a new system? Pause all sync pairs via API before the migration window and resume them automatically once the deployment finishes.

PATCH /api/v1/sync-pairs/{id}

Build internal tools

Surface calendar availability directly in your internal dashboard. Query connection status and sync history to build a live operations view for your team.

GET /api/v1/connections

Authentication

All API requests require a secret API key passed in the Authorization header. You can generate an API key from your account settings.

curl https://calendarsync.app/api/v1/connections \
-H "Authorization: Bearer cs_live_your_api_key"

API keys are prefixed with cs_live_ for production and cs_test_ for development. Keep your keys secret and rotate them if compromised.

Base URL

All API endpoints are relative to:

https://calendarsync.app/api/v1

All requests and responses use JSON. Include Content-Type: application/json for POST/PATCH requests.

Rate Limits

Free Plan

100

requests / hour

Pro Plan

2,000

requests / hour

Rate limit headers are included in every response: X-RateLimit-Remaining and X-RateLimit-Reset.

Webhooks

CalendarSync can notify your application via webhooks when sync events occur. Configure a webhook URL in your settings.

Events sent to your endpoint:

  • sync.completed — a sync run finished successfully
  • sync.failed — a sync run encountered an error
  • connection.expired — a calendar token needs re-authorization

Webhook payloads are signed with HMAC-SHA256 using your webhook secret. Verify the X-CalSync-Signature header to ensure authenticity.

Endpoints

GET/api/v1/connections

List all connected calendar accounts for the authenticated user.

Example Response

{
  "connections": [
    {
      "id": "conn_abc123",
      "provider": "google",
      "email": "you@gmail.com",
      "calendar_name": "My Calendar",
      "status": "active",
      "last_synced_at": "2026-03-28T10:00:00Z"
    }
  ]
}
GET/api/v1/sync-pairs

List all sync pairs and their current status.

Example Response

{
  "pairs": [
    {
      "id": "pair_xyz789",
      "connection_a_id": "conn_abc123",
      "connection_b_id": "conn_def456",
      "sync_mode": "blocker",
      "direction": "bidirectional",
      "status": "active",
      "last_synced_at": "2026-03-28T10:00:00Z"
    }
  ]
}
POST/api/v1/sync-pairs/:id/trigger

Manually trigger a sync for a specific sync pair.

Example Response

{
  "success": true,
  "sync_id": "sync_run_123",
  "events_processed": 12,
  "events_created": 2,
  "events_updated": 0,
  "events_deleted": 1
}
GET/api/v1/logs

Retrieve sync logs. Pro plan includes 90-day history; free plan 7 days.

Example Response

{
  "logs": [
    {
      "id": "log_456",
      "pair_id": "pair_xyz789",
      "status": "success",
      "events_synced": 12,
      "duration_ms": 843,
      "created_at": "2026-03-28T10:00:00Z"
    }
  ],
  "total": 48,
  "page": 1
}

Error Codes

StatusCodeMeaning
401unauthorizedMissing or invalid API key
403forbiddenAPI key doesn't have permission for this resource
404not_foundThe requested resource doesn't exist
422validation_errorRequest body failed validation
429rate_limitedToo many requests — back off and retry
500server_errorSomething went wrong on our end

Ready to build?

Generate your API key in account settings. Free trial includes full API access.

Get Your API Key