curl --request PUT \
--url https://api.ahasend.com/v2/accounts/{account_id}/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"url": "<string>",
"enabled": true,
"on_reception": true,
"on_delivered": true,
"on_transient_error": true,
"on_failed": true,
"on_bounced": true,
"on_suppressed": true,
"on_opened": true,
"on_clicked": true,
"on_suppression_created": true,
"on_dns_error": true,
"scope": "<string>",
"domains": [
"<string>"
]
}'
{
"object": "webhook",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"url": "<string>",
"enabled": true,
"on_reception": true,
"on_delivered": true,
"on_transient_error": true,
"on_failed": true,
"on_bounced": true,
"on_suppressed": true,
"on_opened": true,
"on_clicked": true,
"on_suppression_created": true,
"on_dns_error": true,
"scope": "<string>",
"domains": [
"<string>"
]
}
Updates an existing webhook
Note: The webhook secret is not updatable
curl --request PUT \
--url https://api.ahasend.com/v2/accounts/{account_id}/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"url": "<string>",
"enabled": true,
"on_reception": true,
"on_delivered": true,
"on_transient_error": true,
"on_failed": true,
"on_bounced": true,
"on_suppressed": true,
"on_opened": true,
"on_clicked": true,
"on_suppression_created": true,
"on_dns_error": true,
"scope": "<string>",
"domains": [
"<string>"
]
}'
{
"object": "webhook",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"url": "<string>",
"enabled": true,
"on_reception": true,
"on_delivered": true,
"on_transient_error": true,
"on_failed": true,
"on_bounced": true,
"on_suppressed": true,
"on_opened": true,
"on_clicked": true,
"on_suppression_created": true,
"on_dns_error": true,
"scope": "<string>",
"domains": [
"<string>"
]
}
API key for authentication
Webhook updated successfully
The response is of type object
.
Was this page helpful?