Create a webhook destination

POST {{baseUrl}}/v3/webhooks

Create a new Webhook Destination with a callback URL and a set of trigger types to send to the URL.
Note: You should limit how many webhook destinations you have for each trigger type. When Nylas retries a webhook, the retry goes to all of the destinations for that trigger type, and can result in a lot of messages. Some webhook testing tools rate limit or block you if your endpoint generates too much traffic. Nylas blocks ngrok connections in v3 for this reason

Request Body

{"trigger_types"=>["<string>", "<string>"], "webhook_url"=>"<string>", "description"=>"<string>", "notification_email_addresses"=>["<string>", "<string>"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;data&quot;:{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;description&quot;:&quot;\u003cstring\u003e&quot;,&quot;trigger_types&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;callback_url&quot;:&quot;\u003cstring\u003e&quot;,&quot;webhook_secret&quot;:&quot;\u003cstring\u003e&quot;,&quot;status&quot;:&quot;\u003cstring\u003e&quot;,&quot;notification_email_addresses&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;]},&quot;request_id&quot;:&quot;\u003cstring\u003e&quot;}