# Webhooks

## **Requisições de Webhook externo**

**Endpoint:** `POST /URL`

**Descrição:** Esse endpoint permite o cadastro de informações e acionamento de fluxos automatizados de acordo com a configuração feita pelo usuário.

**Request**

* **URL:** `URL DO WEBHOOK`
* **Método HTTP:** `POST`
* **Cabeçalhos:**
  * `Content-Type: application/json`
* **Corpo da Requisição (JSON):**

Os campos são de livre criação e configurados no painel do CRM.\
Abaixo temos alguns exemplos:

<table><thead><tr><th width="170">Campo</th><th width="98">Tipo</th><th width="199">Descrição</th><th>Exemplo</th></tr></thead><tbody><tr><td><code>nome</code></td><td>string</td><td>Nome do cliente.</td><td><code>"João Silva"</code></td></tr><tr><td><code>telefone</code></td><td>string</td><td>Número de telefone do cliente, com código do país.</td><td><code>"+5511999999999"</code></td></tr><tr><td><code>veiculo</code></td><td>string</td><td>Modelo do veículo do cliente.</td><td><code>"Fiat Uno"</code></td></tr><tr><td><code>data_compra</code></td><td>string</td><td>Data da compra do veículo no formato ISOstring (UTC).</td><td><code>"2024-08-21T14:00:00.000Z" ou "2024-8-21"</code></td></tr></tbody></table>

### **Exemplo**[ ](#user-content-fn-1)[^1]**de Requisição**

```javascript
{
  "nome": "João Silva",
  "telefone": "+5511999999999",
  "veiculo": "Fiat Uno",
  "data_compra": "2024-08-21T14:00:00.000Z"
}
```

### **Comando CURL**

```bash
curl -X POST UrlDoWebhook \
-H "Content-Type: application/json" \
-d '{
  "nome": "João Silva",
  "telefone": "+5511999999999",
  "veiculo": "Fiat Uno",
  "data_compra": "2024-08-21T14:00:00.000Z"
}'
```

### **Respostas**

* **204:** A solicitação foi bem-sucedida.
* **400 Bad Request:** A solicitação está malformada ou contém dados inválidos.
* **404 Not Found:** O endpoint ou recurso solicitado não foi encontrado
* **500 Internal Server Error:** Erro interno no servidor ao processar a solicitação. Nenhum corpo de resposta é enviado.

### Notas <a href="#notas" id="notas"></a>

* Certifique-se de que o campo `data_compra` esteja no formato ISOstring, como `YYYY-MM-DDTHH:mm:ss.sssZ ou YYYY-MM-DD`
* Para os códigos 204 e 404 a resposta não inclui nenhum conteúdo além do código de status.

[^1]:


---

# 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://ajuda.livechat360.com.br/crm/informacoes/webhooks.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.
