PUT
/api/v1/calendars/{id}Actualizar calendario
Actualizar un calendario existente
Autenticación
Envía tu API key en el header x-api-key header.
x-api-keybearer
Parámetros
idobligatoriopath · string
ID del calendario
Cuerpo de la petición
obligatorioDatos del calendario actualizados
PublicApiUpdateCalendarDto
namestring
Name of the calendar
descriptionstring
Description of the calendar
hexColorstring
Hex color code for the calendar
hexForegroundColorstring
Hex foreground color code for the calendar
isPrimaryboolean
Whether this is the primary calendar
locationstring
Location associated with the calendar
timezonestring
IANA time zone database formatted string
readOnlyboolean
Whether the calendar is read-only
metadataobject
Additional metadata for the calendar
Ejemplo de petición
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"
}
}
Respuestas
200Calendario actualizado correctamente
PublicApiUpdateCalendarResponseDto
statusCoderequirednumber
countrequirednumber
errorrequiredstring
datarequiredPublicApiCalendarDto
Ejemplo de respuesta
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"
}
}
401No autorizado - clave API o token Bearer faltante o inválido