# members.profile_agenda

Agenda de uma pessoa (detalhe do membro). Reuniões (tarefas do tipo meeting) e tarefas abertas da pessoa. `week`: reuniões com data entre `weekStart` e 7 dias depois; `period`: reuniões entre `from` e agora; `openTasks`: tarefas não concluídas que não são reunião, com o grupo (atrasada, hoje, próxima). Lê as 500 tarefas mais próximas da pessoa. O Atomiks não registra falta nem cancelamento de reunião: uma reunião é aberta ou concluída.

- Endpoint: `POST https://app.atomiks.com.br/api/v1/members.profile_agenda` (corpo JSON)
- Quem pode chamar: administrador da conta
- Escopo da chave: `team:read`
- Grava dados: não
- Pela chave de API: sim
- Ferramenta MCP: `members_profile_agenda`
- Ficha em JSON: `https://app.atomiks.com.br/api/v1/openapi.json` (operationId `members.profile_agenda`)

## Entrada

| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
| `userId` | string (uuid) | sim |  |
| `weekStart` | string (date-time) | sim |  |
| `from` | string (date-time) | sim |  |

<details><summary>JSON Schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "userId": {
      "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)$"
    },
    "weekStart": {
      "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)))$"
    },
    "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)))$"
    }
  },
  "required": [
    "userId",
    "weekStart",
    "from"
  ]
}
```

</details>

## Exemplo

```bash
curl -X POST https://app.atomiks.com.br/api/v1/members.profile_agenda \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"userId":"00000000-0000-0000-0000-000000000000","weekStart":"2026-10-26T00:00:00Z","from":"2026-09-26T00:00:00Z"}'
```

CLI:

```bash
node cli/atomiks.mjs members.profile_agenda --json '{"userId":"00000000-0000-0000-0000-000000000000","weekStart":"2026-10-26T00:00:00Z","from":"2026-09-26T00:00:00Z"}'
```

MCP: ferramenta `members_profile_agenda` com a mesma entrada.

## Saída

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

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "week": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "todo",
              "call",
              "message",
              "meeting"
            ]
          },
          "dueAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "done": {
            "type": "boolean"
          },
          "durationMinutes": {
            "type": [
              "number",
              "null"
            ]
          },
          "meetingUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "contactName": {
            "type": [
              "string",
              "null"
            ]
          },
          "opportunityId": {
            "type": [
              "string",
              "null"
            ]
          },
          "bucket": {
            "type": "string",
            "enum": [
              "overdue",
              "today",
              "upcoming",
              "no_date",
              "done"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "kind",
          "dueAt",
          "done",
          "durationMinutes",
          "meetingUrl",
          "contactName",
          "opportunityId",
          "bucket"
        ],
        "additionalProperties": false
      }
    },
    "period": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "todo",
              "call",
              "message",
              "meeting"
            ]
          },
          "dueAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "done": {
            "type": "boolean"
          },
          "durationMinutes": {
            "type": [
              "number",
              "null"
            ]
          },
          "meetingUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "contactName": {
            "type": [
              "string",
              "null"
            ]
          },
          "opportunityId": {
            "type": [
              "string",
              "null"
            ]
          },
          "bucket": {
            "type": "string",
            "enum": [
              "overdue",
              "today",
              "upcoming",
              "no_date",
              "done"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "kind",
          "dueAt",
          "done",
          "durationMinutes",
          "meetingUrl",
          "contactName",
          "opportunityId",
          "bucket"
        ],
        "additionalProperties": false
      }
    },
    "openTasks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "todo",
              "call",
              "message",
              "meeting"
            ]
          },
          "dueAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "done": {
            "type": "boolean"
          },
          "durationMinutes": {
            "type": [
              "number",
              "null"
            ]
          },
          "meetingUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "contactName": {
            "type": [
              "string",
              "null"
            ]
          },
          "opportunityId": {
            "type": [
              "string",
              "null"
            ]
          },
          "bucket": {
            "type": "string",
            "enum": [
              "overdue",
              "today",
              "upcoming",
              "no_date",
              "done"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "kind",
          "dueAt",
          "done",
          "durationMinutes",
          "meetingUrl",
          "contactName",
          "opportunityId",
          "bucket"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "week",
    "period",
    "openTasks"
  ],
  "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).
