---
title: "Rename a conversation"
method: PATCH
path: "/v1/assistant/sessions/{session_id}"
tags: ["Assistant"]
---

# Rename a conversation

`PATCH /v1/assistant/sessions/{session_id}`

## Request

- Base URL: `https://api.naturali.ai`
- URL: `https://api.naturali.ai/v1/assistant/sessions/{session_id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.naturali.ai/authorize`, token URL `https://api.naturali.ai/token`, scopes: `mcp:access`)

Sets the name the conversation is listed by. A name given before the first message is kept.

## Request body

- object
  - `name` string, required: Trimmed before it is stored.

## Response `200`

The renamed session.

- AssistantSession: One conversation with the Assistant in the app.
  - `id` string, required
  - `name` string, nullable, required: The name given to the conversation, else its first message cut to 60 characters; null until either.
  - `status` 'open' | 'closed' | 'expired', required: Only an `open` session takes messages.
  - `created_at` string, date-time, required
  - `last_activity_at` string, date-time, nullable, required: When the session last took a message; null until the first.

## Other responses

- `400`: `name` is missing, blank or longer than 60 characters.
- `401`: Missing or invalid credentials.
- `403`: The credential cannot hold the account's conversation (`access_denied`): it is confined to one project, or it is the Assistant's own turn credential.
- `404`: The resource does not exist (existence is not leaked).
- `502`: The turn could not be run or read (`upstream_unavailable`).
- `503`: This deployment serves no Assistant conversation (`assistant_unavailable`).

---

[API](https://skmtc.dev/naturali/apis/naturali-ai-api.md) · [All operations](https://skmtc.dev/naturali/apis/naturali-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/naturali/apis/naturali-ai-api/revisions/e4905b78f422?raw)
