Skip to main content

PUT /calendars

Description

Updates data on a calendar (event type)

The route handles the PUT request made to the /calendars/{id} path.

HTTP methodRouteQuery parameters
PUT/calendarsid

Query parameters

The next parameter is sent in the request line:

NameTypeDescription
idnumberRequired. The ID of the calendar to be updated.

Payload

The server needs to receive a json object with the next properties (both unchanged and modified properties are expected):

NameTypeDescription
labelstringRequired. The name of the calendar to be updated.
descriptionstringOptional. Calendar description.
colorobjectRequired. An object with the style parameters applied to the events of the calendar: background - (optional) a HEX code of the event background color related to the current calendar, border - (optional) a HEX code of the event border color related to the current calendar, textColor - (optional) a HEX code of the event text color related to the current calendar.

Example:

{
"label": "My Calendar",
"description": "Updated",
"color": {
"background": "#5890DC",
"border": "#2D74D3"
}
}

Response

No data is returned back. The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).


Related articles: Working with server