# activities_board.list

Listar atividades (tarefas e reuniões). Tarefas e reuniões dos contatos que o chamador vê, com os filtros da tela Atividades. `bucket`: `ongoing` (abertas, da mais próxima para a mais distante, sem data por último), `done` (concluídas, da mais recente) ou omitido (todas, por prazo). Paginado: `page`, `perPage` (40, até 1000); `total` é a contagem do filtro.

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

## Entrada

| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
| `types` | "call" \| "whatsapp" \| "meeting" \| "task" \| "appointment"[] | não |  |
| `pipelineIds` | string (uuid)[] | não |  |
| `overdue` | boolean | não |  |
| `overdueBefore` | string (date-time) | não |  |
| `allDayStart` | string (date-time) | não |  |
| `conditions` | object[] | não |  |
| `search` | string | não |  |
| `startDate` | string (date-time) | não |  |
| `endDate` | string (date-time) | não |  |
| `withoutDeadline` | boolean | não |  |
| `bucket` | "ongoing" \| "done" | não |  |
| `page` | integer | não |  |
| `perPage` | integer | não |  |

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

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "types": {
      "maxItems": 5,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "call",
          "whatsapp",
          "meeting",
          "task",
          "appointment"
        ]
      }
    },
    "pipelineIds": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "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)$"
      }
    },
    "overdue": {
      "type": "boolean"
    },
    "overdueBefore": {
      "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)))$"
    },
    "allDayStart": {
      "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)))$"
    },
    "conditions": {
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "matcher": {
            "type": "string",
            "enum": [
              "all",
              "any"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "and",
              "or"
            ]
          },
          "conditions": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "maxLength": 40
                },
                "operator": {
                  "type": "string",
                  "maxLength": 30
                },
                "value": {
                  "maxItems": 100,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 200
                  }
                }
              },
              "required": [
                "field",
                "operator",
                "value"
              ]
            }
          }
        },
        "required": [
          "matcher",
          "conditions"
        ]
      }
    },
    "search": {
      "type": "string",
      "maxLength": 120
    },
    "startDate": {
      "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)))$"
    },
    "endDate": {
      "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)))$"
    },
    "withoutDeadline": {
      "type": "boolean"
    },
    "bucket": {
      "type": "string",
      "enum": [
        "ongoing",
        "done"
      ]
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "perPage": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    }
  }
}
```

</details>

## Exemplo

```bash
curl -X POST https://app.atomiks.com.br/api/v1/activities_board.list \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bucket":"ongoing"}'
```

CLI:

```bash
node cli/atomiks.mjs activities_board.list --json '{"bucket":"ongoing"}'
```

MCP: ferramenta `activities_board_list` 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": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "task",
              "appointment"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "call",
              "whatsapp",
              "meeting",
              "task",
              "appointment"
            ]
          },
          "title": {
            "type": "string"
          },
          "startAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "endAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "allDay": {
            "type": "boolean"
          },
          "durationMinutes": {
            "type": [
              "number",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "scheduled",
              "resolved",
              "cancelled",
              "completed"
            ]
          },
          "contactName": {
            "type": [
              "string",
              "null"
            ]
          },
          "contactEmail": {
            "type": [
              "string",
              "null"
            ]
          },
          "contactPhone": {
            "type": [
              "string",
              "null"
            ]
          },
          "leadId": {
            "type": "string"
          },
          "opportunityCardId": {
            "type": [
              "string",
              "null"
            ]
          },
          "opportunityCardTitle": {
            "type": [
              "string",
              "null"
            ]
          },
          "opportunityPipelineId": {
            "type": [
              "string",
              "null"
            ]
          },
          "opportunityPipelineName": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "meetingLink": {
            "type": [
              "string",
              "null"
            ]
          },
          "guests": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "attendantId": {
            "type": [
              "string",
              "null"
            ]
          },
          "attendantName": {
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "outcomeNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "urgent",
              "high",
              "medium",
              "low",
              "none"
            ]
          },
          "conversationId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "type",
          "title",
          "startAt",
          "endAt",
          "allDay",
          "durationMinutes",
          "status",
          "contactName",
          "contactEmail",
          "contactPhone",
          "leadId",
          "opportunityCardId",
          "opportunityCardTitle",
          "opportunityPipelineId",
          "opportunityPipelineName",
          "notes",
          "meetingLink",
          "guests",
          "attendantId",
          "attendantName",
          "outcome",
          "outcomeNote",
          "priority",
          "conversationId"
        ],
        "additionalProperties": false
      }
    },
    "total": {
      "type": "number"
    },
    "pages": {
      "type": "number"
    },
    "page": {
      "type": "number"
    }
  },
  "required": [
    "items",
    "total",
    "pages",
    "page"
  ],
  "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).
