List Webhooks
Request Example
curl -X GET "https://api.leavo.ai/backend/webhooks" \
-H "Authorization: Bearer your_api_key_here"
Response
{
"success": true,
"data": [
{
"id": "webhook-uuid",
"url": "https://your-app.com/webhooks/leavo",
"events": ["lead.created", "lead.status_changed"],
"active": true,
"created_at": "2024-01-15T10:30:00Z"
}
]
}
Get Webhook
GET /backend/webhooks/{id}
curl -X GET "https://api.leavo.ai/backend/webhooks/webhook-uuid" \
-H "Authorization: Bearer your_api_key_here"
Update Webhook
PUT /backend/webhooks/{id}
Request Example
curl -X PUT "https://api.leavo.ai/backend/webhooks/webhook-uuid" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"events": ["lead.created", "message.received"],
"active": false
}'
Delete Webhook
DELETE /backend/webhooks/{id}
curl -X DELETE "https://api.leavo.ai/backend/webhooks/webhook-uuid" \
-H "Authorization: Bearer your_api_key_here"
Response
Regenerate Secret
POST /backend/webhooks/{id}/regenerate-secret
Generates a new secret for signature verification.
curl -X POST "https://api.leavo.ai/backend/webhooks/webhook-uuid/regenerate-secret" \
-H "Authorization: Bearer your_api_key_here"
Response
{
"success": true,
"data": {
"secret": "whsec_new_secret_here"
}
}
After regenerating the secret, update your integration to use the new value.