Skip to main content
POST
/
webhooks
Criar webhook
curl --request POST \
  --url http://localhost:3001/webhooks/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "url": "<string>",
  "events": [
    "crm.lead.created"
  ],
  "description": "<string>",
  "isActive": true,
  "headers": {}
}
'
{
  "id": "<string>",
  "officeId": "<string>",
  "name": "<string>",
  "description": "<string>",
  "url": "<string>",
  "secret": "<string>",
  "events": [
    "<string>"
  ],
  "isActive": true,
  "headers": {},
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.jurichat.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Insira o token JWT no formato: Bearer {token}

Body

application/json
name
string
required

Nome legível para este endpoint de webhook (ex.: "Integração com CRM").

Required string length: 1 - 100
url
string<uri>
required

A URL HTTPS que receberá os payloads de evento via HTTP POST.

events
enum<string>[]
required

Lista de nomes de eventos para se inscrever. Use GET /webhooks/events para listar todos os eventos disponíveis.

Minimum array length: 1
Available options:
crm.lead.created,
crm.lead.updated,
crm.lead.deleted,
crm.lead.moved,
chat.conversation.created,
chat.conversation.updated,
chat.conversation.assigned,
contact.created,
contact.updated,
contact.deleted,
webhook.test
description
string

Descrição opcional explicando para que este webhook é usado.

Maximum string length: 500
isActive
boolean
default:true

Se este webhook está ativo. Webhooks inativos não recebem nenhum evento.

headers
object

Cabeçalhos HTTP personalizados opcionais para incluir em cada requisição de entrega (ex.: {"Authorization": "Bearer token"}).

Response

Default Response

id
string
required

ID único do webhook.

officeId
string
required

ID do escritório ao qual este webhook pertence.

name
string
required

Nome do webhook.

description
string | null
required

Descrição do webhook.

url
string
required

URL de destino para entregas de eventos.

secret
string
required

HMAC-SHA256 segredo de autenticação usado para verificar o header X-JuriChat-Signature em cada entrega.

events
string[]
required

Lista de nomes de eventos inscritos.

isActive
boolean
required

Se este webhook está ativo.

headers
object
required

Cabeçalhos personalizados enviados com cada entrega.

createdAt
string
required

Timestamp de criação ISO 8601.

updatedAt
string
required

Timestamp de última atualização ISO 8601.