Replace all webhooks
/api/v2/account/webhooks
Replace all webhooks for your account. This endpoint completely replaces the existing webhook configuration.
Body Parameters
Returns
message: optional string
Replace all webhooks
curl https://api.sendblue.co/api/v2/account/webhooks \
-X PUT \
-H 'Content-Type: application/json' \
-H "sb-api-key-id: $SENDBLUE_API_API_KEY" \
-H "sb-api-secret-key: $SENDBLUE_API_API_SECRET" \
-d '{
"webhooks": {
"call_log": [
"https://example.com/call-webhook"
],
"contact_created": [
"https://example.com/contact-webhook"
],
"globalSecret": "my-global-secret",
"receive": [
"https://example.com/webhook1",
{
"url": "https://example.com/webhook2",
"secret": "webhook-secret"
}
]
}
}'
{
"status": "OK",
"message": "message",
"webhooks": {
"call_log": [
"https://example.com/webhook"
],
"contact_created": [
"https://example.com"
],
"globalSecret": "globalSecret",
"line_assigned": [
"https://example.com/webhook"
],
"line_blocked": [
"https://example.com/webhook"
],
"outbound": [
"https://example.com/webhook"
],
"receive": [
"https://example.com/webhook"
],
"secret": "secret"
}
}Returns Examples
{
"status": "OK",
"message": "message",
"webhooks": {
"call_log": [
"https://example.com/webhook"
],
"contact_created": [
"https://example.com"
],
"globalSecret": "globalSecret",
"line_assigned": [
"https://example.com/webhook"
],
"line_blocked": [
"https://example.com/webhook"
],
"outbound": [
"https://example.com/webhook"
],
"receive": [
"https://example.com/webhook"
],
"secret": "secret"
}
}