API de Calendário (Reuniões)
Crie, liste, atualize e exclua reuniões com leads. Ideal para integrar com calendários ou CRMs.
Base: /api/meetings
Autenticação: Authorization: Bearer {token}
Permissões: Admin e Agent
Criar reunião
http
POST /api/meetings
Authorization: Bearer {token}
Content-Type: application/json
{
"leadId": "uuid-do-lead",
"title": "Reunião de apresentação",
"description": "Apresentar proposta comercial",
"startAt": "2025-03-20T10:00:00.000Z",
"endAt": "2025-03-20T11:00:00.000Z",
"locationOrLink": "https://meet.google.com/xxx-yyyy-zzz",
"assignedAgentId": "uuid-do-agente"
}Campos
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
leadId | string (UUID) | Sim | ID do lead |
title | string | Sim | Título da reunião |
startAt | string (ISO 8601) | Sim | Início |
endAt | string (ISO 8601) | Sim | Fim |
description | string | Não | Descrição |
locationOrLink | string | Não | Local ou link (ex: Google Meet) |
assignedAgentId | string (UUID) | Não | Agente responsável |
Listar reuniões por período
Retorna reuniões em um intervalo de datas — útil para montar calendário.
http
GET /api/meetings?start=2025-03-01&end=2025-03-31&assignedToMe=true
Authorization: Bearer {token}Query params
| Parâmetro | Tipo | Descrição |
|---|---|---|
start | string (ISO date) | Data inicial (ex: 2025-03-01) |
end | string (ISO date) | Data final (ex: 2025-03-31) |
assignedToMe | boolean | Se true, apenas reuniões do usuário logado |
Obter uma reunião
http
GET /api/meetings/:id
Authorization: Bearer {token}Atualizar reunião
http
PATCH /api/meetings/:id
Authorization: Bearer {token}
Content-Type: application/json
{
"title": "Reunião remarcada",
"startAt": "2025-03-21T14:00:00.000Z",
"endAt": "2025-03-21T15:00:00.000Z"
}Todos os campos são opcionais no body.
Excluir reunião
http
DELETE /api/meetings/:id
Authorization: Bearer {token}Retorna 204 No Content.
Resumo de rotas
| Método | Rota | Descrição |
|---|---|---|
POST | /api/meetings | Criar reunião |
GET | /api/meetings?start=&end=&assignedToMe= | Listar por período |
GET | /api/meetings/:id | Detalhe |
PATCH | /api/meetings/:id | Atualizar |
DELETE | /api/meetings/:id | Excluir |
