PATCH /teams/{teamId}/calendar/events/{id}
Update série ou override de ocorrência.
- Acesso: Membro da equipe
- Serviço:
https://api-calendar.axuz.net
Autenticação aceita
sessionCookie— Sessão plena Axuz (cookie de sessão da casa). Sessão restrita é 403 enrollment_required.bearerSession— JWT de acesso da sessão em `Authorization: Bearer`.
Responde PATCH /teams/{teamId}/calendar/events/{id}.
Motivo: mutação de event; ramifica em duas semânticas: "editar série" (default) vs "override de uma ocorrência" quando ?occurrence=RFC3339.
Comportamento: se ?occurrence= presente e válida — só o creator do event pode editar; delega repo.UpsertReplaceOverride (uma linha em event_overrides com action=replace); responde {override_id, recurrence_id, event_id}. Caso contrário revalida RRULE/tz e delega repo.UpdateEvent (master row). ErrNotFound → 404; "nothing to update" → 400.
Entradas: URL params + JSON updateEventInput + query occurrence.
Retorno: JSON entity ou override.
Parâmetros
| Nome | Em | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
teamId | path | string | sim | |
id | path | string | sim | |
occurrence | query | string | não | RFC3339 datetime da ocorrência-alvo. Quando presente, PATCH cria override e DELETE registra EXDATE em vez de mutar a série toda. |
Corpo da requisição
application/json · Obrigatório
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
summary | string | null | não | |
description | string | null | não | |
location | string | null | não | |
dtstart | string<date-time> | null | não | |
dtend | string<date-time> | null | não | |
all_day | boolean | null | não | |
rrule | string | null | não | |
tz | string | null | não | |
reminders | array<CalendarReminderInput> | null | não | R-007. Ausente/null = não toca os lembretes; |
{
"summary": "string",
"description": "string",
"location": "string",
"dtstart": "2026-01-15T12:00:00Z",
"dtend": "2026-01-15T12:00:00Z",
"all_day": true,
"rrule": "string",
"tz": "string",
"reminders": [
{
"trigger_offset_minutes": 1,
"kind": "email"
}
]
}Respostas
200
Event ou override.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
(corpo) | oneOf | não |
400
Input inválido.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim | Mensagem humana curta; sem stack. |
401
Faltando ou token inválido.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim | Mensagem humana curta; sem stack. |
403
Sem permissão para o recurso.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim | Mensagem humana curta; sem stack. |
404
Recurso não encontrado.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim | Mensagem humana curta; sem stack. |
429
Limite de requisições excedido.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
500
Erro interno. Tente de novo com backoff; reporte o X-Request-Id.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
Exemplos
O "Try it" está desligado nesta referência. Use os exemplos com a sua credencial de teste.
curl
curl -sS -X PATCH 'https://api-calendar.axuz.net/teams/TEAM_ID/calendar/events/ID' \
-H "Authorization: Bearer $AXUZ_TOKEN" \
-H "Content-Type: application/json" \
-d '{"summary":"string","description":"string","location":"string","dtstart":"2026-01-15T12:00:00Z","dtend":"2026-01-15T12:00:00Z","all_day":true,"rrule":"string","tz":"string","reminders":[{"trigger_offset_minutes":1,"kind":"email"}]}'Node.js
const res = await fetch("https://api-calendar.axuz.net/teams/TEAM_ID/calendar/events/ID", {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"summary": "string",
"description": "string",
"location": "string",
"dtstart": "2026-01-15T12:00:00Z",
"dtend": "2026-01-15T12:00:00Z",
"all_day": true,
"rrule": "string",
"tz": "string",
"reminders": [
{
"trigger_offset_minutes": 1,
"kind": "email"
}
]
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());Python
import os
import requests
res = requests.request(
"PATCH",
"https://api-calendar.axuz.net/teams/TEAM_ID/calendar/events/ID",
headers={
"Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
},
json={
"summary": "string",
"description": "string",
"location": "string",
"dtstart": "2026-01-15T12:00:00Z",
"dtend": "2026-01-15T12:00:00Z",
"all_day": True,
"rrule": "string",
"tz": "string",
"reminders": [
{
"trigger_offset_minutes": 1,
"kind": "email",
},
],
},
timeout=30,
)
res.raise_for_status()
print(res.json())