Update a webhook

Updates a webhook's name, URL, subscribed events, channels, custom headers, mailbox scope, or status and returns the updated endpoint.

PATCH
/v1/webhooks/{id}

Updates a webhook's name, URL, subscribed events, channels, custom headers, mailbox scope, or status and returns the updated endpoint. A change to mailboxIds or namespaceId is checked as the endpoint will stand afterward: every mailbox must belong to the namespace when both are set.

x-api-key<token>

In: header

Path Parameters

id*string
Match^wep_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name?|null
url?string|null
eventTypes?array<>|null
channels?array<>|null|null
mailboxIds?array<>|null|null
namespaceId?|null|null
headers?|null
status?|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/webhooks/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "name": "string",  "url": "string",  "eventTypes": [    "message.sent"  ],  "channels": [    "email"  ],  "mailboxIds": [    "string"  ],  "namespaceId": "string",  "status": "active",  "hasCustomHeaders": true,  "failureStartedAt": "string",  "lastSucceededAt": "string",  "createdAt": "string",  "updatedAt": "string"}

Related documentation