Update a webhook
Update an existing webhook.
patch
Authorizations
Api-TokenstringRequired
API token in Api-Token header
Path parameters
webhook_idintegerRequiredExample:
Webhook ID
1Body
Responses
200
Webhook updated successfully
application/json
401
Returns unauthorized error message. Check your credentials.
application/json
403
Returns forbidden error message. Check your permissions.
application/json
404
Resource not found
application/json
422
Validation errors
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?

