# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.aliviaapp.com.br/autenticacao.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
