Skip to content
Skip to main content
POST
/v3/grants/{grant_id}/messages/{message_id}/smart-compose

Compose a reply

Generates a reply to the specified message based on a prompt.

NYLAS API KEYACCESS TOKEN

Parameters

Path parameters

grant_id*string

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.

message_id*string

ID of the message to access. Nylas recommends you URL-encode this field, or you might receive a 404 error if the ID contains special characters (for example, #).

Request body

promptstring

The prompt that Smart Compose uses to generate a message suggestion.

Example: "Reply to John Doe about the upcoming project."
maxLength: 1000

Responses

Content-Type: application/json, text/event-stream
request_idstring

The request ID.

dataobject
POSThttps://api.us.nylas.com/v3/grants/{grant_id}/messages/{message_id}/smart-compose

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

grant_idrequiredstring

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.

message_idrequiredstring

ID of the message to access. Nylas recommends you URL-encode this field, or you might receive a `404` error if the ID contains special characters (for example, #).

Loading editor...

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