Ver .md

connections.google_events

Ver os eventos ocupados do Google Calendar. Eventos do atendente entre from e to (ISO 8601) nos calendários marcados (selected): externalId, startAt, endAt, title. Fora cancelados, os marcados como "livre" e os recusados. Sem conexão (ou conexão expirada) vem vazio. O próprio atendente ou um administrador; até 366 dias.

  • Endpoint: POST https://app.atomiks.com.br/api/v1/connections.google_events (corpo JSON)
  • Quem pode chamar: membro da conta
  • Escopo da chave: crm:read
  • Grava dados: não
  • Pela chave de API: sim
  • Ferramenta MCP: connections_google_events
  • Ficha em JSON: https://app.atomiks.com.br/api/v1/openapi.json (operationId connections.google_events)

Entrada

CampoTipoObrigatórioNota
fromstring (date-time)sim
tostring (date-time)sim
attendantIdstring (uuid)não
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "to": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "attendantId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "from",
    "to"
  ]
}

Exemplo

curl -X POST https://app.atomiks.com.br/api/v1/connections.google_events \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from":"2026-11-02T00:00:00-03:00","to":"2026-11-03T00:00:00-03:00"}'

CLI:

node cli/atomiks.mjs connections.google_events --json '{"from":"2026-11-02T00:00:00-03:00","to":"2026-11-03T00:00:00-03:00"}'

MCP: ferramenta connections_google_events com a mesma entrada.

Saída

Sucesso: {"data": ...} com o formato abaixo.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string"
          },
          "startAt": {
            "type": "string"
          },
          "endAt": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "externalId",
          "startAt",
          "endAt",
          "title"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "items"
  ],
  "additionalProperties": false
}

Erros

{"error": {"code", "message", "requestId"}}. Códigos: invalid_input (400), unauthorized (401), forbidden / account_pending / scope_missing (403), not_found (404), limit_reached (409), internal (500).