> ## Documentation Index
> Fetch the complete documentation index at: https://docsapi.wiseapp360.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Provisionar uma conta

> Crie contas e usuários pela API de Plataforma.

Requer um **token de Platform App**, gerado pelo super admin. Veja [Autenticação](https://docsapi.wiseapp360.com/guias/autenticacao.md).

**1. Crie a conta**

```bash theme={null}
curl -X POST https://chat.wiseapp360.com/platform/api/v1/accounts \
  -H "api_access_token: $WISEAPP_PLATFORM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Ltda",
    "locale": "pt_BR",
    "support_email": "suporte@acme.com.br",
    "status": "active",
    "limits": { "users": 25, "inboxes": 10 }
  }'
```

A resposta traz o `id` da conta.

**2. Crie o usuário**

```bash theme={null}
curl -X POST https://chat.wiseapp360.com/platform/api/v1/users \
  -H "api_access_token: $WISEAPP_PLATFORM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Daniel", "email": "daniel@acme.com.br", "password": "UmaSenhaForte2!" }'
```

**3. Vincule o usuário à conta**

```bash theme={null}
curl -X POST https://chat.wiseapp360.com/platform/api/v1/accounts/{account_id}/account_users \
  -H "api_access_token: $WISEAPP_PLATFORM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "user_id": 1, "role": "administrator" }'
```

> [!NOTE]
>
> Um Platform App só enxerga contas e usuários criados por ele ou associados a ele pelo super admin.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.