Ver .md

visitors.export

Exportar visitantes em CSV. CSV com um visitante por linha dos que batem com a busca e os filtros (mesmos de visitors.list): ID, acessos, sessões, canal, dispositivo, última página e funil, e o contato vinculado. Devolve filename, csv (texto) e count. Sem rastreio no Atomiks, só o cabeçalho.

  • Endpoint: POST https://app.atomiks.com.br/api/v1/visitors.export (corpo JSON)
  • Quem pode chamar: membro da conta
  • Escopo da chave: contacts:read
  • Grava dados: não
  • Pela chave de API: sim
  • Ferramenta MCP: visitors_export
  • Ficha em JSON: https://app.atomiks.com.br/api/v1/openapi.json (operationId visitors.export)

Entrada

CampoTipoObrigatórioNota
searchstringnão
projectIdsstring[]não
excludeProjectIdsstring[]não
pageIdsstring[]não
excludePageIdsstring[]não
funnelIdsstring[]não
excludeFunnelIdsstring[]não
channels"google" | "facebook" | "instagram" | "tiktok" | "youtube" | "linkedin" | "whatsapp" | "email" | "referral" | "direct" | "other"[]não
excludeChannels"google" | "facebook" | "instagram" | "tiktok" | "youtube" | "linkedin" | "whatsapp" | "email" | "referral" | "direct" | "other"[]não
hasLeadbooleannão
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "search": {
      "type": "string",
      "maxLength": 120
    },
    "projectIds": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 80
      }
    },
    "excludeProjectIds": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 80
      }
    },
    "pageIds": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 80
      }
    },
    "excludePageIds": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 80
      }
    },
    "funnelIds": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 80
      }
    },
    "excludeFunnelIds": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 80
      }
    },
    "channels": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "google",
          "facebook",
          "instagram",
          "tiktok",
          "youtube",
          "linkedin",
          "whatsapp",
          "email",
          "referral",
          "direct",
          "other"
        ]
      }
    },
    "excludeChannels": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "google",
          "facebook",
          "instagram",
          "tiktok",
          "youtube",
          "linkedin",
          "whatsapp",
          "email",
          "referral",
          "direct",
          "other"
        ]
      }
    },
    "hasLead": {
      "type": "boolean"
    }
  }
}

Exemplo

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

CLI:

node cli/atomiks.mjs visitors.export --json '{}'

MCP: ferramenta visitors_export com a mesma entrada.

Saída

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

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "filename": {
      "type": "string"
    },
    "csv": {
      "type": "string"
    },
    "count": {
      "type": "number"
    }
  },
  "required": [
    "filename",
    "csv",
    "count"
  ],
  "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).