# groups.numbers_shareable

Números de atendimento que podem também servir a Grupos. Canais `whatsapp_web` da conta com `usage = inbox` e não desconectados (`usage: "inbox"`: podem ser compartilhados). Com `campaignId`, inclui também os `usage = both` ainda não vinculados àquela campanha (`usage: "both"`: já compartilhados, prontos para vincular). Número da API oficial (Cloud API) não aparece: não serve a Grupos.

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

## Entrada

| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
| `campaignId` | string (uuid) | não |  |

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

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

</details>

## Exemplo

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

CLI:

```bash
node cli/atomiks.mjs groups.numbers_shareable --json '{}'
```

MCP: ferramenta `groups_numbers_shareable` 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": {
    "numbers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "channelId": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "usage": {
            "type": "string",
            "enum": [
              "inbox",
              "both"
            ]
          }
        },
        "required": [
          "channelId",
          "name",
          "phone",
          "status",
          "usage"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "numbers"
  ],
  "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).
