Amazon SNS Notifications

Create an Amazon SNS channel

Create an Amazon SNS notification channel in the specified application.

The topic must be a valid Amazon SNS topic ARN (starting with arn:aws:sns:).

post/v3/channels/sns

Request body

descriptionstring

A human-readable description of the Amazon SNS channel.

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.

topicstring required

The Amazon SNS topic ARN that Nylas sends notifications to. Must start with arn:aws:sns:.

role_arnstring required

The ARN of the IAM role that Nylas assumes to publish messages to the SNS topic. Must match arn:aws:iam::<account-id>:role/<role-name>.

notification_email_addressesstring[]

The email addresses that Nylas notifies if delivery to the Amazon SNS channel fails.

compressed_deliveryboolean

If true, Nylas gzip-compresses and then base64-encodes notification payloads before delivering them. Nylas adds a content_encoding: gzip+base64 message attribute to the SNS message. To decode, base64-decode the message body, then gzip-decompress. Default is false.

Example request

{
  "description": "Production SNS channel for Events notifications",
  "topic": "arn:aws:sns:us-east-1:123456789012:my-topic",
  "role_arn": "arn:aws:iam::123456789012:role/nylas-sns-role",
  "notification_email_addresses": [
    "jane@example.com",
    "joe@example.com"
  ],
  "compressed_delivery": true
}

Response

Amazon SNS channel created

request_idstring

The unique ID of the request that generated this response.

Example response

{
  "data": {
    "id": "UMWjAjMeWQ4D8gYF2moonK4486",
    "description": "Production SNS channel for Grant notifications",
    "topic": "arn:aws:sns:us-east-1:123456789012:my-topic",
    "role_arn": "arn:aws:iam::123456789012:role/nylas-sns-role",
    "notification_email_addresses": [
      "jane@example.com",
      "joe@example.com"
    ]
  }
}

Changes

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