Create a new calendar
After being created, the calendar will be connected to the specified calendar platform.
Headers
- Type: stringAuthorizationrequired
API key for authentication
- Type: stringContent
- Type requiredShould always be application/json
Body·
required
application/json
- Type: stringclient
_id min length:1requiredThe client ID for the calendar platform authentication
- Type: stringclient
_secret min length:1requiredThe client secret for the calendar platform authentication
- Type: string · enumplatformrequired
The calendar platform (google or microsoft)
google- Googlemicrosoft- Microsoft
values- google
- microsoft
- Type: stringrefresh
_token min length:1requiredThe refresh token for accessing the calendar platform
- Type: stringdeduplication
_key min length:1Optional 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.
- metadata
JSON object containing metadata to associate with the calendar
- Type: stringplatform
_uuid min length:1The UUID of the calendar on the calendar platform. Specify only for non-primary calendars.
Responses
- application/json
- 400
Invalid input
Request Example for post/api/v1/calendars
curl https://app.attendee.dev/api/v1/calendars \
--request POST \
--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",
"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"
}