Webhook Notifications

Update a webhook destination

Update the values in a specific webhook destination.

Limitations

  • You only need to specify fields that need to change when you make a request to this endpoint. Empty fields in the request do not overwrite existing fields.
  • You should limit how many webhook destinations you have for each trigger type. When Nylas retries a webhook, the retry goes to all destinations for the specific trigger type. This can result in a lot of notifications.
  • Some webhook testing tools rate-limit or block you if your webhook destination endpoint generates too much traffic. Nylas blocks Ngrok connections for this reason.
put/v3/webhooks/{id}

Path parameters

idstring required

Request body

descriptionstring

A human-readable description of the webhook destination.

trigger_typesstring[]

The event that triggers the notification. See the notification schemas for details about each trigger type.

See the Grants, Calendar, Events, and Messages references for information on how to trigger each event type.

webhook_urlstring

The URL to send webhooks to.

status'active' | 'pause'

The new status of the destination.

notification_email_addressesstring[]

The email addresses that Nylas notifies when a webhook is down for a while. See the rate limit documentation for details.

compressed_deliveryboolean

If true, Nylas compresses notification payloads using gzip before delivering them. Nylas adds the Content-Encoding: gzip header to the request.

Example request

{
  "description": "Production webhook destination",
  "webhook_url": "https://example.com/webhooks",
  "notification_email_addresses": [
    "abc@example.com",
    "def@example.com"
  ],
  "compressed_delivery": true
}

Response

Destination Updated

request_idstring

The ID for each request.

Example response

{
  "data": {
    "id": "UMWjAjMeWQ4D8gYF2moonK4486",
    "description": "Production webhook destination",
    "webhook_url": "https://example.com/webhooks",
    "notification_email_addresses": [
      "jane@example.com",
      "joe@example.com"
    ],
    "status_updated_at": 1234567890,
    "created_at": 1234567890,
    "updated_at": 1234567890
  }
}

Changes