# groups.sends_list

Listar os disparos da campanha. Jobs de enviar, apagar e editar mensagem, do mais novo ao mais antigo, com progresso, título da mensagem e agendamento de origem (`scheduleId`). Apagar e editar trazem o disparo original em `sourceJobId`. Disparos de boas-vindas (`isWelcome`) ficam de fora, a menos que `includeWelcome` seja verdadeiro.

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

## Entrada

| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
| `campaignId` | string (uuid) | sim |  |
| `limit` | integer | não | padrão 20 |
| `includeWelcome` | boolean | não | padrão false |

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

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "campaignId": {
      "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)$"
    },
    "limit": {
      "default": 20,
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "includeWelcome": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "campaignId"
  ]
}
```

</details>

## Exemplo

```bash
curl -X POST https://app.atomiks.com.br/api/v1/groups.sends_list \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"campaignId":"00000000-0000-4000-8000-000000000001","limit":20,"includeWelcome":false}'
```

CLI:

```bash
node cli/atomiks.mjs groups.sends_list --json '{"campaignId":"00000000-0000-4000-8000-000000000001","limit":20,"includeWelcome":false}'
```

MCP: ferramenta `groups_sends_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"
          },
          "status": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "done": {
            "type": "number"
          },
          "failed": {
            "type": "number"
          },
          "nextAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "isWelcome": {
            "type": "boolean"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "messageKind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "text",
                  "media",
                  "link",
                  "poll",
                  "contact"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "scheduleId": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceJobId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "total",
          "done",
          "failed",
          "nextAt",
          "lastReason",
          "createdAt",
          "isWelcome",
          "title",
          "messageKind",
          "scheduleId",
          "sourceJobId"
        ],
        "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).
