---
title: "Rename or pin an AI Assistant thread"
method: PATCH
path: "/assistant/threads/{origin}/{thread_id}/"
tags: ["assistant"]
---

# Rename or pin an AI Assistant thread

`PATCH /assistant/threads/{origin}/{thread_id}/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/assistant/threads/{origin}/{thread_id}/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Rename a thread, pin or unpin it, or both. The rename is kept beside the store's own title, so the list shows it and the store keeps naming the thread after its first message. A thread that is not yours answers 404, the same as one that does not exist.

## Path parameters

- `origin` 'chat', required: Which store a thread lives in. ONE MEMBER, on purpose. There were four assistants and four transcript tables; three were retired and there is one assistant now. The enum stays rather than collapsing to nothing, because `origin` is still half of how a meta row names a thread and is still on the wire, and because a second store arriving is a change to this list rather than to every signature that carries it. ``table``, ``find_leads`` and ``agent`` were the other three. Their rows are deleted by a release task in the same release that drops their tables: every read here coerces the column back into this enum, so a row naming a member that no longer exists raises rather than being skipped.
- `thread_id` string, uuid, required

## Request body

- AssistantThreadUpdateSchema: Rename a thread, pin or unpin it, or both. A field left out is left alone.
  - `pinned` boolean, nullable: True pins the thread to the top; false unpins.
  - `title` string, nullable: The new title. Kept beside the store's own title rather than written into it, so the store keeps naming the thread after its first message and this is what the list shows instead.

## Response `200`

Successful Response

- AssistantThreadReadSchema: One thread in the list, from whichever assistant it belongs to.
  - `continued_from` AssistantThreadRefSchema, required: One thread, named by its store and its id in that store.
    - `origin` 'chat', required: Which store a thread lives in. ONE MEMBER, on purpose. There were four assistants and four transcript tables; three were retired and there is one assistant now. The enum stays rather than collapsing to nothing, because `origin` is still half of how a meta row names a thread and is still on the wire, and because a second store arriving is a change to this list rather than to every signature that carries it. ``table``, ``find_leads`` and ``agent`` were the other three. Their rows are deleted by a release task in the same release that drops their tables: every read here coerces the column back into this enum, so a row naming a member that no longer exists raises rather than being skipped.
    - `thread_id` string, uuid, required
  - `continued_in` AssistantThreadRefSchema, required: One thread, named by its store and its id in that store.
    - `origin` 'chat', required: Which store a thread lives in. ONE MEMBER, on purpose. There were four assistants and four transcript tables; three were retired and there is one assistant now. The enum stays rather than collapsing to nothing, because `origin` is still half of how a meta row names a thread and is still on the wire, and because a second store arriving is a change to this list rather than to every signature that carries it. ``table``, ``find_leads`` and ``agent`` were the other three. Their rows are deleted by a release task in the same release that drops their tables: every read here coerces the column back into this enum, so a row naming a member that no longer exists raises rather than being skipped.
    - `thread_id` string, uuid, required
  - `created_at` string, date-time, required
  - `last_message_at` string, date-time, nullable, required
  - `open_path` string, required: Where the dashboard navigates to reopen the thread: its chat.
  - `origin` 'chat', required: Which store a thread lives in. ONE MEMBER, on purpose. There were four assistants and four transcript tables; three were retired and there is one assistant now. The enum stays rather than collapsing to nothing, because `origin` is still half of how a meta row names a thread and is still on the wire, and because a second store arriving is a change to this list rather than to every signature that carries it. ``table``, ``find_leads`` and ``agent`` were the other three. Their rows are deleted by a release task in the same release that drops their tables: every read here coerces the column back into this enum, so a row naming a member that no longer exists raises rather than being skipped.
  - `origin_ref_id` string, uuid, nullable, required: The table or saved agent the thread is bound to; null for a lead search or the general chat.
  - `origin_ref_label` string, nullable, required: That table's or agent's name, or what a lead search was for; null when the thread is bound to nothing, or its agent is gone.
  - `pinned` boolean, required
  - `shared` boolean, required: A legacy table thread nobody is recorded as starting, which the whole workspace sees and may rename, pin or delete.
  - `thread_id` string, uuid, required
  - `title` string, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Thread not found, or not the caller's
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/dc5ac3c84444?raw)
