Skip to content
Skip to main content
POST
/v3/webhooks

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.

NYLAS API KEY

Request body

Destination definition

descriptionstring

A human-readable description of the webhook destination.

Example: "Production webhook destination"
trigger_types*array<string>

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_url*string

The URL to send webhooks to.

Example: "https://example.com/webhooks"
notification_email_addressesarray<string>

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.

Default: false
Example: true

Responses

dataobject
request_idstring

The request ID for each request.

POSThttps://api.us.nylas.com/v3/webhooks

Find your API key in the Nylas Dashboard under API Keys in your application settings.

Loading editor...

Autocomplete and validation come from this endpoint's request schema.