Pub/Sub Notifications

Create a Pub/Sub channel

Create a Pub/Sub channel in the specified application.

post/v3/channels/pubsub

Request body

descriptionstring

A human-readable description of the Pub/Sub 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

The Google Pub/Sub topic that Nylas sends notifications to.

notification_email_addressesstring[]

The email addresses that Nylas notifies if delivery to the Pub/Sub channel fails.

compressed_deliveryboolean

If true, Nylas compresses notification payloads using gzip before delivering them. Nylas adds a content_encoding: gzip message attribute to the Pub/Sub message. Default is false.

Example request

{
  "description": "Production Pub/Sub for Events notifications",
  "topic": "projects/your-project-id/topics/your-topic-id",
  "notification_email_addresses": [
    "jane@example.com",
    "joe@example.com"
  ],
  "compressed_delivery": true
}

Response

Pub/Sub channel created

request_idstring

The unique ID of the request that generated this response.

Example response

{
  "data": {
    "id": "UMWjAjMeWQ4D8gYF2moonK4486",
    "description": "Production Pub/Sub channel for Grant notifications",
    "topic": "projects/your-project-id/topics/your-topic-id",
    "notification_email_addresses": [
      "jane@example.com",
      "joe@example.com"
    ]
  }
}

Changes

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