Add new webhooks
/api/v2/account/webhooks
Add new webhooks to your account. This endpoint appends webhooks to the existing list.
Body Parameters
Returns
message: optional string
Add new webhooks
curl https://api.sendblue.co/api/v2/account/webhooks \
-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": [
"https://example.com/new-webhook",
{
"url": "https://example.com/webhook-with-secret",
"secret": "my-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"
}
}