---
title: "Generate Next Best Action"
method: POST
path: "/users/me/conversations/{conversation_id}/nba"
tags: ["conversations"]
---

# Generate Next Best Action

`POST /users/me/conversations/{conversation_id}/nba`

Generate next best action suggestion for a conversation.

Analyzes the conversation up to the specified message (or entire conversation if message_id not provided) to identify:
- Automation opportunities (e.g., setting reminders, saving preferences)
- Information to remember for future interactions

Returns a JSON structure with suggestion details.

## Path parameters

- `conversation_id` string, required

## Query parameters

- `message_id` string, nullable — Optional message ID to analyze up to. If not provided, uses entire conversation.

## Response `200`

Successful Response

- NextBestActionResponse — Response from next best action generation
  - `has_suggestion` boolean
  - `suggestion_type` string
  - `thinking` string
  - `suggestion` NextBestActionSuggestion — Suggestion details for next best action
    - `title` string
    - `description` string
    - `action_type` string
    - `confidence` string

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `409` — Conflict
- `422` — Validation Error
- `500` — Internal server error

---

[API](https://skmtc.net/adapter/apis/adapter-api.md) · [All operations](https://skmtc.net/adapter/apis/adapter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/adapter/adapter-api/versions/ab13bbbbd391/schema)
