> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rocketblue.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch update topics

> Rename multiple topics in one request.

Rename one or more topics in a single call. Prefer this over repeated [Rename topic](/api-reference/topics-prompts/rename-topic) calls when updating more than one topic.

### Request body

<ParamField body="topics" type="TopicUpdate[]" required>
  Non-empty array of topic renames.

  <Expandable title="TopicUpdate">
    <ParamField body="id" type="string" required>
      Topic UUID.
    </ParamField>

    <ParamField body="name" type="string" required>
      New topic name (non-empty after trim).
    </ParamField>
  </Expandable>
</ParamField>

### Request

```bash theme={null}
curl -s -X POST \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "topics": [
      { "id": "TOPIC_ID_1", "name": "Pricing & packaging" },
      { "id": "TOPIC_ID_2", "name": "Security & compliance" }
    ]
  }' \
  "https://app.rocketblue.ai/api/v1/topics/batch-update"
```

### Response

<ResponseField name="updatedCount" type="integer">
  Number of topics updated.
</ResponseField>

<ResponseField name="updatedTopics" type="object[]">
  Updated topic objects with `id`, `name`, and `brandId`.
</ResponseField>

<ResponseField name="brandIds" type="string[]">
  Brands affected by the update.
</ResponseField>

<ResponseField name="brandId" type="string | null">
  Present when all updated topics belonged to a single brand.
</ResponseField>

```json theme={null}
{
  "updatedCount": 2,
  "updatedTopics": [
    {
      "id": "topic-uuid-1",
      "name": "Pricing & packaging",
      "brandId": "brand-uuid-123"
    },
    {
      "id": "topic-uuid-2",
      "name": "Security & compliance",
      "brandId": "brand-uuid-123"
    }
  ],
  "brandIds": ["brand-uuid-123"],
  "brandId": "brand-uuid-123"
}
```
