Replace webhooks
webhooks.update(WebhookUpdateParams**kwargs) -> WebhookUpdateResponse
/api/account/webhooks
Replace all webhooks for the account. This overwrites existing webhooks.
Parameters
Returns
Replace webhooks
import os
from sendblue_api import SendblueAPI
client = SendblueAPI(
api_key=os.environ.get("SENDBLUE_API_API_KEY"), # This is the default and can be omitted
api_secret=os.environ.get("SENDBLUE_API_API_SECRET"), # This is the default and can be omitted
)
webhook = client.webhooks.update(
webhooks={},
)
print(webhook.message)
{
"message": "Webhooks updated 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 updated 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"
]
}
}