← Back to listing
PUT/api/v1/calendars/{id}

Update calendar

Update an existing calendar

Authentication

Send your API key in the x-api-key header.

x-api-keybearer

Parameters

idrequired

path · string

Calendar ID

Request body

required

Updated calendar data

PublicApiUpdateCalendarDto

name

string

Name of the calendar

description

string

Description of the calendar

hexColor

string

Hex color code for the calendar

hexForegroundColor

string

Hex foreground color code for the calendar

isPrimary

boolean

Whether this is the primary calendar

location

string

Location associated with the calendar

timezone

string

IANA time zone database formatted string

readOnly

boolean

Whether the calendar is read-only

metadata

object

Additional metadata for the calendar

Example request

json
{
  "name": "My Updated Calendar",
  "description": "My updated personal calendar for work events",
  "hexColor": "#4285f4",
  "hexForegroundColor": "#ffffff",
  "isPrimary": false,
  "location": "New York, NY",
  "timezone": "America/New_York",
  "readOnly": false,
  "metadata": {
    "customField": "value"
  }
}

Responses

200Calendar updated successfully

PublicApiUpdateCalendarResponseDto

statusCoderequired

number

countrequired

number

errorrequired

string

datarequired

PublicApiCalendarDto

Example response

json
{
  "statusCode": 200,
  "count": 0,
  "error": null,
  "data": {
    "id": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d",
    "name": "My Calendar",
    "description": "My personal calendar for work events",
    "hexColor": "#4285f4",
    "hexForegroundColor": "#ffffff",
    "isPrimary": false,
    "location": "New York, NY",
    "timezone": "America/New_York",
    "readOnly": false,
    "metadata": {
      "customField": "value"
    },
    "createdAt": "2024-07-15T09:00:00.000Z",
    "updatedAt": "2024-07-15T09:30:00.000Z"
  }
}
401Unauthorized - missing or invalid API key or Bearer token