Skip to content
Skip to main content
POST
/v3/channels/pubsub

Create a Pub/Sub channel

Create a Pub/Sub channel in the specified application.

NYLAS API KEY

Request body

Destination definition

descriptionstring

A human-readable description of the Pub/Sub channel.

Example: "Production Pub/Sub for Events notifications"
trigger_types*array<string>

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.

Example: "projects/your-project-id/topics/your-topic-id"
notification_email_addressesarray<string>

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.

Default: false
Example: true

Responses

dataobject
request_idstring

The unique ID of the request that generated this response.

POSThttps://api.us.nylas.com/v3/channels/pubsub

Find your API key in the Nylas Dashboard under API Keys in your application settings.

Loading editor...

Autocomplete and validation come from this endpoint's request schema.