> For the complete documentation index, see [llms.txt](https://doc.aliviaapp.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.aliviaapp.com.br/autenticacao.md).

# Autenticação&#x20;

## Autenticação

<mark style="color:green;">`POST`</mark> /api/v1/adm/usuarios/autenticar

Este endpoint permite que os usuários façam login no sistema utilizando seu e-mail e senha. Ao autenticar-se com sucesso, um token de acesso (Bearer token) é retornado, o qual deve ser utilizado para autenticar todas as requisições subsequentes à API.

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**Body**

| Name         | Type   | Description                      |
| ------------ | ------ | -------------------------------- |
| **email**    | string | O endereço de e-mail do usuário. |
| **password** | string | A senha do usuário.              |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "ok": true,
  "usuario": {
    "id": 3,
    "created_at": "2024-03-11T12:14:56.000Z",
    "updated_at": "2024-05-16T09:45:26.000Z",
    "deleted_at": null,
    "nome": "Robert Andrade de Souza",
    "email": "robert@aliviaapp.com.br",
    "situacao": "A"
  },
  "permissao": {
    "id": 3,
    "created_at": "2024-03-26T16:35:36.000Z",
    "updated_at": null,
    "tipo": "WHITE_LABEL_ADMIN",
    "usuario_id": 3,
    "white_label_id": 3
  },
  "token": "eyJh...",
  "whiteLabelInfo": {
    "nome": "AliviaApp Sistema",
    "integracao_key": "8217f550-6bc7-4558-875f-0f1c5b770cb9"
  }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "titulo": "Falha ao efetuar autenticação"
}
```

{% endtab %}
{% endtabs %}
