Webhook Notifications

Create a webhook destination

Creates a webhook destination with the specified URL and list of trigger types.

Webhook destinations and retry logic

You should limit the number of webhook destinations you have for each trigger type. When Nylas retries a webhook, the retry goes to all the destinations for that trigger type. This can result in a lot of notifications.

Some webhook testing tools rate-limit or block you if your endpoint generates too much traffic. Nylas blocks Ngrok connections for this reason.

Webhook notification header

Every webhook notification Nylas sends includes the x-nylas-signature header. If you're using the Nylas SDKs, you might see X-Nylas-Signature instead.

post/v3/webhooks

Request body

descriptionstring

A human-readable description of the webhook destination.

trigger_typesstring[] required

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 required

The URL to send webhooks to.

notification_email_addressesstring[]

The email addresses that Nylas notifies when a webhook is down for a while. See Failing and failed webhooks 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. Default is false.

Example request

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

Response

Webhook Destination Created

request_idstring

The request ID for each request.

Example response

{
  "data": {
    "id": "UMWjAjMeWQ4D8gYF2moonK4486",
    "description": "Production webhook destination",
    "webhook_url": "https://example.com/webhooks",
    "webhook_secret": "41dD3-nXTUfebYuk81Gr",
    "notification_email_addresses": [
      "jane@example.com",
      "joe@example.com"
    ]
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.