Add webhooks
/api/account/webhooks
Add new webhooks to the account. Webhooks are appended to existing ones.
Body Parameters
Returns
message: optional string
status: optional string
Add webhooks
curl https://api.sendblue.co/api/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"
]
}'
{
"message": "Webhooks added successfully",
"status": "OK",
"webhooks": {
"globalSecret": "whsec_global123",
"line_assigned": [
"https://example.com"
],
"line_blocked": [
"https://example.com"
],
"outbound": [
"https://example.com"
],
"receive": [
"https://example.com"
]
}
}
Returns Examples
{
"message": "Webhooks added successfully",
"status": "OK",
"webhooks": {
"globalSecret": "whsec_global123",
"line_assigned": [
"https://example.com"
],
"line_blocked": [
"https://example.com"
],
"outbound": [
"https://example.com"
],
"receive": [
"https://example.com"
]
}
}