Ver .md

groups.groups_create_preview

Estimar quanto leva criar grupos em lote. Conta o tempo mínimo para criar count grupos com os limites vigentes da ação create_group no estágio do número e o que ele já usou hoje. minutes é nulo se o limite atual não permite criar. fitsToday: cabe no teto do dia.

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

Entrada

CampoTipoObrigatórioNota
campaignIdstring (uuid)sim
channelIdstring (uuid)sim
countintegersim
JSON Schema
{
  "$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)$"
    },
    "channelId": {
      "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)$"
    },
    "count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "required": [
    "campaignId",
    "channelId",
    "count"
  ]
}

Exemplo

curl -X POST https://app.atomiks.com.br/api/v1/groups.groups_create_preview \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"campaignId":"00000000-0000-4000-8000-000000000001","channelId":"00000000-0000-4000-8000-000000000001","count":30}'

CLI:

node cli/atomiks.mjs groups.groups_create_preview --json '{"campaignId":"00000000-0000-4000-8000-000000000001","channelId":"00000000-0000-4000-8000-000000000001","count":30}'

MCP: ferramenta groups_groups_create_preview com a mesma entrada.

Saída

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

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "minutes": {
      "type": [
        "number",
        "null"
      ]
    },
    "fitsToday": {
      "type": "boolean"
    },
    "stage": {
      "type": "number"
    },
    "perDay": {
      "type": "number"
    },
    "usedToday": {
      "type": "number"
    }
  },
  "required": [
    "minutes",
    "fitsToday",
    "stage",
    "perDay",
    "usedToday"
  ],
  "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).