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


---

# 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://docs.stric.com.br/documentacao/autenticacao-1/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.
