---
title: "Compose a reply"
method: POST
path: "/v3/grants/{grant_id}/messages/{message_id}/smart-compose"
tags: ["Smart compose"]
---

# Compose a reply

`POST /v3/grants/{grant_id}/messages/{message_id}/smart-compose`

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

## Request body

- object — A Smart Compose request.
  - `prompt` string — The prompt that Smart Compose uses to generate a message suggestion.

## Response `200`

Returns a suggestion for a message

- object
  - `request_id` string — The request ID.
  - `data` object — The response object.
    - `suggestion` string, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `422` — Validation Error
- `500` — Unexpected Error

---

[API](https://skmtc.dev/nylas/apis/nylas-api.md) · [All operations](https://skmtc.dev/nylas/apis/nylas-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nylas/nylas-api/revisions/51c2c1b4ecff/schema)
