Nylas Pub/Sub Notifications API

Nylas offers two ways to get notifications of what's happening on the provider. You can either subscribe to webhook notifications, or you can set up a notification channel. Nylas offers Pub/Sub and Amazon SNS notification channels. These can be used in place of, or in addition to, normal webhook notifications. To use Pub/Sub notifications, you first need to set up a Pub/Sub queue on Google Cloud Platform. For detailed set up instructions see the [Pub/Sub notifications documentation](/docs/v3/notifications/pubsub-channel/). To use Amazon SNS notifications, you need to set up an SNS topic and IAM role in your AWS account. For detailed set up instructions see the [Amazon SNS notifications documentation](/docs/v3/notifications/sns-channel/). Nylas notification channels use the same notification [trigger types and schemas](/docs/reference/notifications/) as webhook notifications, and require the same [provider scopes](/docs/dev-guide/scopes/). ## Payload compression Both Pub/Sub and SNS channels accept a `compressed_delivery` boolean that gzip-compresses each notification payload before delivery. Nylas adds a `content_encoding` message attribute (`gzip` for Pub/Sub, `gzip+base64` for SNS) so your subscriber knows which messages to decompress. We strongly recommend enabling it on SNS channels, where the 256 KB message limit makes compression the simplest way to avoid payload truncation. For setup and decode patterns, see [Reducing payload size with compression](/docs/dev-guide/best-practices/compression/). ## Monitor grant status The most important notifications to subscribe to are those related to grant status: `grant.created`, `grant.updated`, `grant.deleted`, and `grant.expired`. They allow you to automate important grant lifecycle processes, like onboarding messages, data refreshes, and backend deletions. The `grant.expired` trigger notifies you when a user needs to re-authenticate their account. When you receive a `grant.expired` notification, you can take appropriate action (for example, notifying the user or starting a background re-authentication process). 📝 When a grant becomes invalid, Nylas cannot access the user's data and does not send you notifications about it. When you re-authenticate a grant, Nylas looks at when the grant last authenticated successfully. If it was less than 72 hours ago, Nylas looks for any changes that happened since the time of the last successful sync, and sends you notifications about them. This can be a lot of notifications. If the grant has been out of service for more than 72 hours, Nylas does _not_ send backfill notifications. In this case, look for the `grant.expired` and `grant.updated` notifications, and query the Nylas API for objects that changed between those timestamps.

Business capability
Webhook & Event Subscription Management BC-4270.80

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v3/webhooks/mock-payload Preview a sample notification payload · Get mock notification payload #
Ask an LLM
“What does a notification body look like for a specific trigger type?”
“Can I get an example payload to test my Pub/Sub consumer?”
Tell an agent
Show an example notification payload for {trigger_type}.
Generate a mock payload for trigger {trigger_type}.
POST /v3/channels/pubsub Create a Pub/Sub notification channel · Create a Pub/Sub channel #
Ask an LLM
“How do I send Nylas notifications to a Google Pub/Sub topic?”
“Can I be emailed if delivery to my Pub/Sub channel fails?”
Tell an agent
Create a Pub/Sub channel to topic {topic} for triggers {trigger_types}.
Set up Pub/Sub delivery of {trigger_types} to {topic} with compressed payloads.
GET /v3/channels/pubsub List Pub/Sub notification channels · Get Pub/Sub channels for an application #
Ask an LLM
“Which Google Pub/Sub channels is my application sending notifications to?”
“Can I see all my Pub/Sub channels at once?”
Tell an agent
List all Pub/Sub channels for my application.
Show every Pub/Sub notification channel in my app.
GET /v3/channels/pubsub/{id} Get one Pub/Sub channel · Get a specific Pub/Sub channel #
Ask an LLM
“What topic and triggers are set on a particular Pub/Sub channel?”
“Can I check a single Pub/Sub channel's status?”
Tell an agent
Show Pub/Sub channel {id}.
Get the configuration of Pub/Sub channel {id}.
PUT /v3/channels/pubsub/{id} Update a Pub/Sub channel · Update a Pub/Sub channel #
Ask an LLM
“How do I restart a Pub/Sub channel I paused?”
“Can I change the topic an existing Pub/Sub channel publishes to?”
Tell an agent
Point Pub/Sub channel {id} at topic {topic}.
Set the status of Pub/Sub channel {id} to {status}.
DELETE /v3/channels/pubsub/{id} Delete a Pub/Sub channel · Delete a specific Pub/Sub channel #
Ask an LLM
“How do I stop sending notifications to a Pub/Sub topic?”
“Can I remove a Pub/Sub channel I no longer use?”
Tell an agent destructive · confirm first
Delete Pub/Sub channel {id}.
Remove Pub/Sub channel {id} from my application.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nylas:nylas-pub-sub-notifications-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nylas-pub-sub-notifications-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nylas Pub/Sub Notifications API
  version: v3
  summary: The complete Nylas v3 API — Email, Calendar, Contacts, Notetaker, Scheduling, Administration, and Migration.
  description: The Nylas API is designed using the REST ideology to provide simple and predictable URIs to access and modify objects. Requests support standard HTTP methods like `GET`, `PUT`, `POST`, and `DELETE`, and standard status codes. Response bodies are always UTF-8 encoded JSON objects, unless explicitly documented otherwise. You can use the Nylas Postman collection to quickly start using the Nylas APIs. For more information, check out the Nylas Postman collection documentation.
  contact:
    url: https://www.nylas.com/
servers:
- url: https://api.us.nylas.com
  description: U.S.
- url: https://api.eu.nylas.com
  description: E.U.
security:
- ACCESS_TOKEN: []
- NYLAS_API_KEY: []
tags:


# --- truncated at 32 KB (32 KB total) ---
# Full source: https://artifacts.apis.io/nylas/openapi/nylas-pub-sub-notifications-api-openapi.yml