Ver .md

groups.campaigns_list

Listar campanhas de grupos. Campanhas de grupos da conta, da mais nova para a mais antiga. Paginação por cursor (devolvido em nextCursor); status filtra. Cada item traz numbers (canais vinculados: channelId, name, phone, status) e groups (total, capturing, full = lotados entre os que captam: membros + reservas >= capacidade).

  • Endpoint: POST https://app.atomiks.com.br/api/v1/groups.campaigns_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_campaigns_list
  • Ficha em JSON: https://app.atomiks.com.br/api/v1/openapi.json (operationId groups.campaigns_list)

Entrada

CampoTipoObrigatórioNota
cursorstringnão
limitintegernãopadrão 50
status"active" | "attention" | "paused" | "ended"não
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cursor": {
      "type": "string",
      "maxLength": 100
    },
    "limit": {
      "default": 50,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "attention",
        "paused",
        "ended"
      ]
    }
  }
}

Exemplo

curl -X POST https://app.atomiks.com.br/api/v1/groups.campaigns_list \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":50}'

CLI:

node cli/atomiks.mjs groups.campaigns_list --json '{"limit":50}'

MCP: ferramenta groups_campaigns_list 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": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "attention",
              "paused",
              "ended"
            ]
          },
          "timezone": {
            "type": "string"
          },
          "shortCode": {
            "type": "string"
          },
          "capacity": {
            "type": "number"
          },
          "rotationPolicy": {
            "type": "string",
            "enum": [
              "sequential",
              "weighted",
              "round_robin"
            ]
          },
          "cookieDays": {
            "type": "number"
          },
          "reservationMinutes": {
            "type": "number"
          },
          "fallbackUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "numbers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "channelId": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": "string"
                },
                "usage": {
                  "default": "groups",
                  "type": "string",
                  "enum": [
                    "groups",
                    "both"
                  ]
                }
              },
              "required": [
                "channelId",
                "name",
                "phone",
                "status",
                "usage"
              ],
              "additionalProperties": false
            }
          },
          "groups": {
            "type": "object",
            "properties": {
              "total": {
                "type": "number"
              },
              "capturing": {
                "type": "number"
              },
              "full": {
                "type": "number"
              }
            },
            "required": [
              "total",
              "capturing",
              "full"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "timezone",
          "shortCode",
          "capacity",
          "rotationPolicy",
          "cookieDays",
          "reservationMinutes",
          "fallbackUrl",
          "createdAt",
          "numbers",
          "groups"
        ],
        "additionalProperties": false
      }
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "nextCursor"
  ],
  "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).