Configuração de Webhooks
A API de Configuração de Webhooks permite gerenciar endpoints de webhook para receber notificações em tempo real sobre eventos da escrituração. Cada tenant pode ter múltiplas configurações de webhook, permitindo que os eventos sejam enviados para diferentes destinos.
Modelo de Dados
Configuração de Webhook
{
"configuration_key": "550e8400-e29b-41d4-a716-446655440000",
"tenant_key": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"url": "https://example.com/webhook",
"headers": {
"Authorization": "Bearer token",
"X-Custom-Header": "value"
},
"hmac_signature_key": "secret-key"
}
Criar Configuração de Webhook (POST)
Request
ENDPOINT
/outgoing_webhook/webhook_configurationMÉTODO
POSTRequest Body
{
"tenant_key": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"url": "https://example.com/webhook",
"hmac_signature_key": "your-secret-key",
"headers": {
"Authorization": "Bearer token",
"X-Custom-Header": "value"
}
}
Request Body Params
Campo | Tipo | Descrição |
---|---|---|
tenant_key * | string | UUID do tenant (UUID v4). |
url * | string | URL de destino para receber os webhooks. |
hmac_signature_key * | string | Chave secreta para assinatura HMAC dos webhooks. |
headers | object | Headers personalizados para incluir nas requisições. |
Response
STATUS
201Response Body
{
"configuration_key": "550e8400-e29b-41d4-a716-446655440000",
"tenant_key": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"url": "https://example.com/webhook",
"headers": {
"Authorization": "Bearer token",
"X-Custom-Header": "value"
},
"hmac_signature_key": "your-secret-key"
}
Response Body Params
Campo | Tipo | Descrição |
---|---|---|
configuration_key | string | Chave única da configuração de webhook (UUID v4). |
tenant_key | string | UUID do tenant. |
url | string | URL de destino configurada. |
headers | object | Headers personalizados configurados. |
hmac_signature_key | string | Chave secreta para assinatura HMAC. |
Listar Configurações de Webhook (GET)
Request
ENDPOINT
/outgoing_webhook/webhook_configurationMÉTODO
GETQuery Params
Campo | Tipo | Descrição |
---|---|---|
tenant_key * | string | UUID do tenant para filtrar as configurações. |
page | integer | Número da página (padrão: 1). |
page_size | integer | Itens por página (padrão: 100). |
Response
STATUS
200Response Body
{
"data": [
{
"configuration_key": "550e8400-e29b-41d4-a716-446655440000",
"tenant_key": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"url": "https://example.com/webhook",
"headers": {
"Authorization": "Bearer token"
},
"hmac_signature_key": "your-secret-key"
}
],
"pagination": {
"current_page": 1,
"page_size": 100,
"total_rows": 15,
"total_pages": 1
}
}
Response Body Params
Campo | Tipo | Descrição |
---|---|---|
data | array | Lista de configurações de webhook. |
pagination | object | Objeto pagination. |
Obter Configuração de Webhook por Chave (GET)
Request
ENDPOINT
/outgoing_webhook/webhook_configuration/CONFIGURATION-KEYMÉTODO
GETPath Params
Campo | Tipo | Descrição | Caracteres |
---|---|---|---|
CONFIGURATION-KEY | string | Chave única da configuração de webhook (UUID v4). | 36 |
Response
STATUS
200Response Body
{
"configuration_key": "550e8400-e29b-41d4-a716-446655440000",
"tenant_key": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"url": "https://example.com/webhook",
"headers": {
"Authorization": "Bearer token"
},
"hmac_signature_key": "your-secret-key"
}
Response Body Params
Campo | Tipo | Descrição |
---|---|---|
configuration_key | string | Chave única da configuração de webhook (UUID v4). |
tenant_key | string | UUID do tenant. |
url | string | URL de destino configurada. |
headers | object | Headers personalizados configurados. |
hmac_signature_key | string | Chave secreta para assinatura HMAC. |
Atualizar Configuração de Webhook (PUT)
Request
ENDPOINT
/outgoing_webhook/webhook_configuration/CONFIGURATION-KEYMÉTODO
PUTPath Params
Campo | Tipo | Descrição | Caracteres |
---|---|---|---|
CONFIGURATION-KEY | string | Chave única da configuração de webhook (UUID v4). | 36 |
Request Body
{
"url": "https://new-url.com/webhook",
"headers": {
"New-Header": "new-value"
},
"hmac_signature_key": "new-secret-key"
}
Request Body Params
Campo | Tipo | Descrição |
---|---|---|
url | string | Nova URL de destino para receber os webhooks. |
headers | object | Novos headers personalizados para incluir nas requisições. |
hmac_signature_key | string | Nova chave secreta para assinatura HMAC dos webhooks. |
Response
STATUS
200Response Body
{
"configuration_key": "550e8400-e29b-41d4-a716-446655440000",
"tenant_key": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"url": "https://new-url.com/webhook",
"headers": {
"New-Header": "new-value"
},
"hmac_signature_key": "new-secret-key"
}
Response Body Params
Campo | Tipo | Descrição |
---|---|---|
configuration_key | string | Chave única da configuração de webhook (UUID v4). |
tenant_key | string | UUID do tenant. |
url | string | URL de destino configurada. |
headers | object | Headers personalizados configurados. |
hmac_signature_key | string | Chave secreta para assinatura HMAC. |
Deletar Configuração de Webhook (DELETE)
Request
ENDPOINT
/outgoing_webhook/webhook_configuration/CONFIGURATION-KEYMÉTODO
DELETEPath Params
Campo | Tipo | Descrição | Caracteres |
---|---|---|---|
CONFIGURATION-KEY | string | Chave única da configuração de webhook (UUID v4). | 36 |
Response
STATUS
200Response Body
{}