# Autenticação

## Autenticação

<mark style="color:green;">`POST`</mark> `/`authenticate

Realiza a autenticação de um usuário ou empresa no ambiente da **Stric API**, gerando um **token JWT** válido por tempo determinado.

O token retornado deve ser enviado nos headers `Authorization` com o formato:

```
Authorization: Bearer <token>
```

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |
| x-tenant-id  | `Tenant ID`        |

**Body**

| Name       | Type   | Description |
| ---------- | ------ | ----------- |
| `document` | string | CPF/CNPJ    |
| `password` | string | Senha       |

**Response**

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

```json
{
  "token": "eyJhbGc...",
  "entityType": "COMPANY",
  "entity": {
    "id": "af45cb52-ddf3-4166-937d-6db1bbff5cc1",
    "email": "contato@neurocode.tech",
    "emailConfirmation": true,
    "phone": "+5521987654321",
    "phoneConfirmation": true,
    "name": "Neurocode Tecnologia Ltda",
    "document": "12345678000199",
    "status": "ACTIVE",
    "onboardingStep": "DONE",
    "hasPin": true
  },
  "accounts": [
    {
      "id": "d9a6f3a2-02c1-4a94-9cbf-08e2b8f1f4ef",
      "bank": "237",
      "agency": "0123",
      "number": "99887766",
      "balance": 15432.55,
      "status": "APPROVED",
      "isEscrow": false,
      "investmentAccount": null
    }
  ]
}

```

{% endtab %}

{% tab title="400" %}

```json
{
    "code": "BAD_REQUEST",
    "error": "Credenciais inválidas",
    "message": "Credenciais inválidas"
}
```

{% endtab %}
{% endtabs %}
