Skip to main content
POST
/
api
/
v1
/
calendars
curl --request POST \
  --url https://app.attendee.dev/api/v1/calendars \
  --header 'Authorization: Token YOUR_API_KEY_HERE' \
  --header 'Content-Type: application/json' \
  --data '{
    "client_id": "123456789-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com",
    "client_secret": "GOCSPX-abcdefghijklmnopqrstuvwxyz",
    "refresh_token": "1//04abcdefghijklmnopqrstuvwxyz",
    "platform": "google",
    "metadata": {
      "tenant_id": "1234567890"
    },
    "deduplication_key": "user-abcd"
  }'
{
  "id": "cal_abcdef1234567890",
  "platform": "google",
  "client_id": "123456789-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com",
  "platform_uuid": "[email protected]",
  "state": "connected",
  "metadata": {
    "tenant_id": "1234567890"
  },
  "deduplication_key": "user-abcd",
  "connection_failure_data": null,
  "created_at": "2025-01-13T10:30:00.123456Z",
  "updated_at": "2025-01-13T10:30:00.123456Z",
  "last_successful_sync_at": null,
  "last_attempted_sync_at": null
}

Authentication

Requires API key authentication via the Authorization header.

Request Body

platform
string
required
The calendar platform (google or microsoft)
client_id
string
required
The client ID for the calendar platform authentication
client_secret
string
required
The client secret for the calendar platform authentication
refresh_token
string
required
The refresh token for accessing the calendar platform
platform_uuid
string
The UUID of the calendar on the calendar platform. Specify only for non-primary calendars.
metadata
object
JSON object containing metadata to associate with the calendar
deduplication_key
string
Optional key for deduplicating calendars. If a calendar with this key already exists in the project, the new calendar will not be created and an error will be returned.

Response

id
string
Unique identifier for the calendar
platform
string
Calendar platform (google or microsoft)
client_id
string
Client ID for the calendar platform authentication
platform_uuid
string
UUID of the calendar on the platform
state
string
Connection state (connected or disconnected)
metadata
object
Metadata associated with the calendar
deduplication_key
string
Optional key for deduplicating calendars
connection_failure_data
object
Information about connection failures, if any
created_at
string
Timestamp when the calendar was created (ISO 8601 format)
updated_at
string
Timestamp when the calendar was last updated (ISO 8601 format)
last_successful_sync_at
string
Timestamp of the last successful sync (ISO 8601 format)
last_attempted_sync_at
string
Timestamp of the last attempted sync (ISO 8601 format)
curl --request POST \
  --url https://app.attendee.dev/api/v1/calendars \
  --header 'Authorization: Token YOUR_API_KEY_HERE' \
  --header 'Content-Type: application/json' \
  --data '{
    "client_id": "123456789-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com",
    "client_secret": "GOCSPX-abcdefghijklmnopqrstuvwxyz",
    "refresh_token": "1//04abcdefghijklmnopqrstuvwxyz",
    "platform": "google",
    "metadata": {
      "tenant_id": "1234567890"
    },
    "deduplication_key": "user-abcd"
  }'
{
  "id": "cal_abcdef1234567890",
  "platform": "google",
  "client_id": "123456789-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com",
  "platform_uuid": "[email protected]",
  "state": "connected",
  "metadata": {
    "tenant_id": "1234567890"
  },
  "deduplication_key": "user-abcd",
  "connection_failure_data": null,
  "created_at": "2025-01-13T10:30:00.123456Z",
  "updated_at": "2025-01-13T10:30:00.123456Z",
  "last_successful_sync_at": null,
  "last_attempted_sync_at": null
}

Build docs developers (and LLMs) love