# admin.accounts.get

Detalhe de uma conta (gestão). Dono, plano, datas, membros com e-mail e último acesso, canais com último webhook, contagens de contatos e conversas e as últimas ações da equipe sobre a conta (null se o registro ainda não existe). Nunca retorna conteúdo.

- Endpoint: `POST https://app.atomiks.com.br/api/v1/admin.accounts.get` (corpo JSON)
- Quem pode chamar: super-admin da plataforma
- Escopo da chave: `admin:read`
- Grava dados: não
- Pela chave de API: sim
- Ferramenta MCP: `admin_accounts_get`
- Ficha em JSON: `https://app.atomiks.com.br/api/v1/openapi.json` (operationId `admin.accounts.get`)

## Entrada

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

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

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "accountId": {
      "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": [
    "accountId"
  ]
}
```

</details>

## Exemplo

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

CLI:

```bash
node cli/atomiks.mjs admin.accounts.get --json '{"accountId":"00000000-0000-0000-0000-000000000000"}'
```

MCP: ferramenta `admin_accounts_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"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "active",
        "blocked"
      ]
    },
    "plan": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "limits": {
          "type": "object",
          "properties": {
            "users": {
              "type": "number"
            },
            "channels": {
              "type": "number"
            },
            "contacts": {
              "type": "number"
            }
          },
          "required": [
            "users",
            "channels",
            "contacts"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "key",
        "name",
        "limits"
      ],
      "additionalProperties": false
    },
    "owner": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        }
      },
      "required": [
        "userId",
        "name",
        "email"
      ],
      "additionalProperties": false
    },
    "createdAt": {
      "type": "string"
    },
    "activatedAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "purgeAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "lastActivityAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "members": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "user"
            ]
          },
          "joinedAt": {
            "type": "string"
          },
          "lastSignInAt": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "userId",
          "name",
          "email",
          "role",
          "joinedAt",
          "lastSignInAt"
        ],
        "additionalProperties": false
      }
    },
    "channels": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "displayPhone": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastWebhookAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "health": {
            "type": "string",
            "enum": [
              "ok",
              "stale",
              "never",
              "off"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "displayPhone",
          "lastWebhookAt",
          "health"
        ],
        "additionalProperties": false
      }
    },
    "counts": {
      "type": "object",
      "properties": {
        "contacts": {
          "type": [
            "number",
            "null"
          ]
        },
        "conversations": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "contacts",
        "conversations"
      ],
      "additionalProperties": false
    },
    "recentAdminActions": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "at": {
                "type": "string"
              },
              "actorName": {
                "type": "string"
              },
              "opId": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              }
            },
            "required": [
              "at",
              "actorName",
              "opId",
              "summary"
            ],
            "additionalProperties": false
          }
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "id",
    "name",
    "status",
    "plan",
    "owner",
    "createdAt",
    "activatedAt",
    "purgeAt",
    "lastActivityAt",
    "members",
    "channels",
    "counts",
    "recentAdminActions"
  ],
  "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).
