# contacts.profile_get

Perfil completo do contato. Dados do contato (nome, telefone, e-mail, Instagram sem @, Telegram, aniversário AAAA-MM-DD, endereço, documento), permissão de envio por canal (`consents`, os 6 canais; `recorded: false` = sem decisão, vale "pode receber"), tags, listas e campos personalizados ativos da conta com o valor do contato (`value: null` quando vazio).

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

## Entrada

| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
| `contactId` | string (uuid) | sim |  |

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

```json
{
  "$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"
  ]
}
```

</details>

## Exemplo

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

CLI:

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

MCP: ferramenta `contacts_profile_get` 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": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "phone": {
      "type": [
        "string",
        "null"
      ]
    },
    "email": {
      "type": [
        "string",
        "null"
      ]
    },
    "instagram": {
      "type": [
        "string",
        "null"
      ]
    },
    "telegram": {
      "type": [
        "string",
        "null"
      ]
    },
    "birthday": {
      "type": [
        "string",
        "null"
      ]
    },
    "address": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "cep": {
              "type": "string"
            },
            "rua": {
              "type": "string"
            },
            "numero": {
              "type": "string"
            },
            "complemento": {
              "type": "string"
            },
            "bairro": {
              "type": "string"
            },
            "cidade": {
              "type": "string"
            },
            "estado": {
              "type": "string"
            },
            "pais": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "document": {
      "type": [
        "string",
        "null"
      ]
    },
    "firstSeenAt": {
      "type": "string"
    },
    "consents": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "whatsapp",
              "email",
              "sms",
              "instagram",
              "telegram",
              "voice"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "opted_in",
              "opted_out"
            ]
          },
          "recorded": {
            "type": "boolean"
          },
          "changedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "manual",
                  "inbound",
                  "import",
                  "api"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "channel",
          "status",
          "recorded",
          "changedAt",
          "source"
        ],
        "additionalProperties": false
      }
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "color"
        ],
        "additionalProperties": false
      }
    },
    "lists": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false
      }
    },
    "customFields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "number",
              "date",
              "select",
              "boolean",
              "file"
            ]
          },
          "fieldType": {
            "type": "string",
            "enum": [
              "text",
              "textarea",
              "number",
              "currency",
              "percentage",
              "date",
              "select",
              "multi_select",
              "radio",
              "link",
              "rating",
              "boolean",
              "file",
              "image"
            ]
          },
          "options": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "position": {
            "type": "number"
          },
          "archived": {
            "type": "boolean"
          },
          "value": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "key",
          "label",
          "type",
          "fieldType",
          "options",
          "position",
          "archived",
          "value"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "id",
    "name",
    "phone",
    "email",
    "instagram",
    "telegram",
    "birthday",
    "address",
    "document",
    "firstSeenAt",
    "consents",
    "tags",
    "lists",
    "customFields"
  ],
  "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).
