For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update a webhook

Update an existing webhook.

patch
Authorizations
Api-TokenstringRequired

API token in Api-Token header

Path parameters
webhook_idintegerRequired

Webhook ID

Example: 1
Body
Responses
200

Webhook updated successfully

application/json
patch/api/webhooks/{webhook_id}
curl -X PATCH https://mailtrap.io/api/webhooks/{webhook_id} \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "webhook": {
      "active": false
    }
  }'
{
  "data": {
    "id": 1,
    "url": "https://example.com/mailtrap/webhooks",
    "active": false,
    "webhook_type": "email_sending",
    "payload_format": "json",
    "sending_stream": "transactional",
    "domain_id": 435,
    "event_types": [
      "delivery",
      "bounce",
      "unsubscribe"
    ]
  }
}

Last updated

Was this helpful?