# Nylas Smart compose API

**Canonical:** https://apis.io/apis/nylas/nylas-smart-compose-api/  
**Provider:** Nylas — https://apis.io/providers/nylas/  
**Base URL:** https://api.us.nylas.com  
**Documentation:** https://developer.nylas.com/docs/reference/api/applications/

Nylas Smart compose API is one of 40 APIs that [Nylas](https://apis.io/providers/nylas/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Smart compose. The published artifact set on APIs.io includes an OpenAPI specification, an API reference, API documentation, a getting-started guide, authentication docs, and rate-limit docs.

The Smart Compose endpoints extend the Nylas Messages API. Currently, Smart Compose supports only two methods of getting AI responses: you can either receive them as a REST response in a single JSON blob, or use server-sent events (SSE) to stream the response tokens as Nylas receives them. If you want to receive responses using the REST method, add the `Accept: application/json` header. Nylas will return a single JSON blob. If you use this method, you might want to add a "working" indicator to your UI, as response times may vary. To enable SSE for a request, add the `Accept: text/event-stream` header. For more information, see the [Smart Compose documentation](/docs/v3/email/smart-compose/). ## Smart Compose scopes The table below lists the Smart Compose endpoints and which scopes they require. The table shortens the full scope URI for space reasons, so add the prefix for the provider when requesting scopes. The ☑️ in each column indicates the most restrictive scope you can request for each provider and still use that API. More permissive scopes appear under the minimum option. If you're already using one of the permissive scopes, you don't need to add the more restrictive scope. | Endpoint | Google Scopes</br>`https://www.googleapis.com/auth/...` | Microsoft Scopes</br>`https://graph.microsoft.com/...` | | :------------------------------------------------------------------------------------- | :------------------------------------------------------ | :------------------------------------------------------------------------------------- | | **POST** `/messages/smart-compose`</br>**POST** `/messages/<MESSAGE_ID>/smart-compose` | `/gmail.readonly` ☑️</br>`/gmail.modify` | `Mail.Read` ☑️</br>`Mail.ReadWrite`</br>`Mail.ReadWrite.Shared`</br>`Mail.Read.Shared` | For more information about scopes, see [Using scopes to request user data](/docs/dev-guide/scopes/).

## Operations (2)

| Method | Path | Summary |
|---|---|---|
| POST | `/v3/grants/{grant_id}/messages/smart-compose` | Compose a message |
| POST | `/v3/grants/{grant_id}/messages/{message_id}/smart-compose` | Compose a reply |

## Machine-readable artifacts (17)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/nylas/refs/heads/main/openapi/nylas-smart-compose-api-openapi.yml
- **APIReference** — https://developer.nylas.com/docs/reference/notifications/
- **Documentation** — https://developer.nylas.com/docs/v3/notifications/
- **Documentation** — https://developer.nylas.com/docs/
- **APIReference** — https://developer.nylas.com/docs/reference/api/
- **GettingStarted** — https://developer.nylas.com/docs/v3/getting-started/
- **Authentication** — https://developer.nylas.com/docs/v3/auth/
- **RateLimits** — https://developer.nylas.com/docs/dev-guide/platform/rate-limits/
- **ErrorCodes** — https://developer.nylas.com/docs/api/errors/
- **Pricing** — https://www.nylas.com/pricing/
- **Signup** — https://dashboard-v3.nylas.com/register
- **StatusPage** — https://status.nylas.com/
- **SDKs** — https://github.com/nylas/nylas-nodejs
- **SDKs** — https://github.com/nylas/nylas-python
- **SDKs** — https://github.com/nylas/nylas-ruby
- **SDKs** — https://github.com/nylas/nylas-java
- **APIReference** — https://developer.nylas.com/docs/reference/api/application-level-templates/

## Other Nylas APIs (12)

- [Nylas Contacts API](https://apis.io/apis/nylas/nylas-contacts-api/)
- [Nylas Drafts API](https://apis.io/apis/nylas/nylas-drafts-api/)
- [Nylas Events API](https://apis.io/apis/nylas/nylas-events-api/)
- [Nylas Messages API](https://apis.io/apis/nylas/nylas-messages-api/)
- [Nylas Threads API](https://apis.io/apis/nylas/nylas-threads-api/)
- [Nylas Notetaker API](https://apis.io/apis/nylas/nylas-notetaker-api/)
- [Nylas Amazon SNS Notifications API](https://apis.io/apis/nylas/nylas-amazon-sns-notifications-api/)
- [Nylas App migration API](https://apis.io/apis/nylas/nylas-app-migration-api/)
- [Nylas Application-level templates API](https://apis.io/apis/nylas/nylas-application-level-templates-api/)
- [Nylas Application-level workflows API](https://apis.io/apis/nylas/nylas-application-level-workflows-api/)
- [Nylas Applications API](https://apis.io/apis/nylas/nylas-applications-api/)
- [Nylas Attachments API](https://apis.io/apis/nylas/nylas-attachments-api/)

## Tags

Smart compose

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/nylas/nylas-smart-compose-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/nylas/.
