# Webhook de Login

### 📌 O que é o Webhook de Login?

O **Webhook de Login** é uma notificação automática enviada pela plataforma **toda vez que um usuário realiza login com sucesso**. Ele serve para informar seu sistema que o usuário acessou a plataforma, e é especialmente útil para controle de acessos, ativações, integrações com sistemas de CRM ou analytics.

<br>

### 🧠 Para que serve o Webhook de Login?

Você pode usar o Webhook de Login para:

* Registrar todos os logins da sua base em tempo real.
* Registrar o momento do último acesso.
* Cruzar comportamento de login com visualização de conteúdo.
* Criar relatórios de engajamento.

<br>

### ⚙️ Como configurar o Webhook de Login?

#### Passo a passo:

1. Acesse o **Painel Admin** da sua marca.
2. Vá até: **Admin > Controle >  Integrações > Webhooks**.
3. Clique em **Novo Webhook**.
4. Preencha com as seguintes informações:\ <br>

   | **Nome** | Webhook Login |
   | -------- | ------------- |

   | **URL de destino** | O endpoint da sua aplicação que receberá o evento (ex: `https://api.suaempresa.com/webhooks/login`) |
   | ------------------ | --------------------------------------------------------------------------------------------------- |

   | **Evento** | `login_usuario` |
   | ---------- | --------------- |

   | **Formato de envio** | <p>JSON (padrão recomendado)<br></p> |
   | -------------------- | ------------------------------------ |

### 📨 Exemplo de payload (corpo da requisição)

Quando um usuário faz login, a Insights envia uma requisição `POST` para sua URL com o seguinte JSON:

{

&#x20; "event": "login\_usuario",

&#x20; "timestamp": "2025-07-18T12:34:56Z",

&#x20; "data": {

&#x20;   "email": "<maria.souza@example.com>",

&#x20;   "full\_name": "Maria Souza",

&#x20;   "cpf": "98765432100",

&#x20;   "phone": "11987654321",

&#x20;   "user\_id": 4567,

&#x20;   "planos\_ativos": \[

&#x20;     {

&#x20;       "id": 101,

&#x20;       "nome": "Plano Premium",

&#x20;       "status": "ativo"

&#x20;     }

&#x20;   ],

&#x20;   "ip": "189.100.55.21",

&#x20;   "navegador": "Chrome 115",

&#x20;   "origem": "web"

&#x20; }

}

<br>

<br>


---

# 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://centraldeajuda.tradeinsights.com/bem-vindo-a-trade-insights/controle/integracoes/webhook/webhook-de-login.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.
