---
title: "Update Topic"
method: PUT
path: "/api/topic"
tags: ["Topic"]
---

# Update Topic

`PUT /api/topic`

Update an existing chat topic. Currently, only the name of the topic can be updated. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.

## Headers

- `TR-Dataset` string, uuid, required

## Request body

- UpdateTopicReqPayload
  - `name` string, required — The new name of the topic. A name is not generated from this field, it is used as-is.
  - `topic_id` string, uuid, required — The id of the topic to target.

## Response `204`

Confirmation that the topic was updated

## Other responses

- `400` — Service error relating to topic update

---

[API](https://skmtc.net/devflowinc/apis/trieve-api.md) · [All operations](https://skmtc.net/devflowinc/apis/trieve-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/devflowinc/trieve-api/revisions/84583e7c9fc1/schema)
