Astrocal
API ReferenceCalendarsV1CalendarsCaldavConnect

Connect a CalDAV calendar

Connects a CalDAV calendar (Apple iCloud, Fastmail, Nextcloud, or custom) using password-based authentication. Verifies credentials before storing.

POST
/v1/calendars/caldav/connect

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Use your API key as the bearer token.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/calendars/caldav/connect" \  -H "Content-Type: application/json" \  -d '{    "member_id": "435a4844-006a-4cfc-a644-e8eb2dd2ca43",    "preset": "apple",    "username": "string",    "password": "string"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "provider": "string",
  "calendar_id": "string",
  "account_email": "string",
  "member_id": "435a4844-006a-4cfc-a644-e8eb2dd2ca43",
  "member_name": "string",
  "connected_at": "string",
  "status": "active",
  "last_sync_at": "string",
  "sync_status": "connected",
  "sync_error": "string",
  "upcoming_booking_count": 0,
  "provider_metadata": {
    "preset": "string",
    "server_url": "string",
    "auth_method": "string",
    "calendar_url": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}