PUT
/
v2
/
accounts
/
{account_id}
/
webhooks
/
{webhook_id}
Update Webhook
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>"
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication

Path Parameters

account_id
string<uuid>
required

Account ID

webhook_id
string<uuid>
required

Webhook ID

Body

application/json

Response

200
application/json

Webhook updated successfully

The response is of type object.