Create a webhook destination
Changed onCreates 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.
Request
- Base URLhttps://api.us.nylas.com
- AuthHTTP bearer
Request body
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
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
- warning
added the new
alert.triggeredenum value to the//response property for the response status - info
added the new
alert.triggeredenum value to the request property/
- warning