Ver .md

contacts.merge_candidates

Possíveis duplicados do contato. Outros contatos (não excluídos, visíveis ao membro) com o mesmo e-mail (sem caixa), telefone (ou o mesmo número como WhatsApp) ou Instagram (sem caixa). matchedBy diz o que coincidiu. Até 20.

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

Entrada

CampoTipoObrigatórioNota
contactIdstring (uuid)sim
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contactId": {
      "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)$"
    }
  },
  "required": [
    "contactId"
  ]
}

Exemplo

curl -X POST https://app.atomiks.com.br/api/v1/contacts.merge_candidates \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contactId":"00000000-0000-0000-0000-000000000000"}'

CLI:

node cli/atomiks.mjs contacts.merge_candidates --json '{"contactId":"00000000-0000-0000-0000-000000000000"}'

MCP: ferramenta contacts_merge_candidates 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",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "instagram": {
            "type": [
              "string",
              "null"
            ]
          },
          "matchedBy": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "email",
                "phone",
                "instagram"
              ]
            }
          }
        },
        "required": [
          "id",
          "name",
          "phone",
          "email",
          "instagram",
          "matchedBy"
        ],
        "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).