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
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"data":{"id":"\u003cstring\u003e","description":"\u003cstring\u003e","trigger_types":["\u003cstring\u003e","\u003cstring\u003e"],"callback_url":"\u003cstring\u003e","webhook_secret":"\u003cstring\u003e","status":"\u003cstring\u003e","notification_email_addresses":["\u003cstring\u003e","\u003cstring\u003e"]},"request_id":"\u003cstring\u003e"}