> ## 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 create topics & prompts

> Create multiple topics and prompts in a single request.

The recommended way to add prompts. One call can create new topics, add prompts to those new topics, and also add prompts to existing topics — all at once.

### Path parameters

**brandId** `string` *required*

Brand UUID. Obtain from [List brands](https://docs.rocketblue.ai/api-reference/brands/list.md).

### Request body

**topics** `TopicInput[]` *required*

Array of topics. Each topic can be new (provide `name`) or existing (provide `id`).

**TopicInput — new topic**

**TopicInput — existing topic**

**PromptInput**

### Request

```bash cURL theme={null}
curl -s -X POST \
  -H "x-spotlight-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "topics": [
      {
        "name": "Pricing",
        "prompts": [
          { "text": "How does the pricing compare to alternatives?", "customerJourney": "consideration" },
          { "text": "Is there a free tier available?" }
        ]
      },
      {
        "id": "existing-topic-uuid",
        "prompts": [
          { "text": "What do customers say about support response times?" }
        ]
      }
    ]
  }' \
  "https://app.rocketblue.ai/api/v1/brands/BRAND_ID/topics-prompts/batch"
```

```python Python theme={null}
import requests

payload = {
    "topics": [
        {
            "name": "Pricing",
            "prompts": [
                {"text": "How does the pricing compare to alternatives?", "customerJourney": "consideration"},
            ],
        },
        {
            "id": "existing-topic-uuid",
            "prompts": [{"text": "What do customers say about support?"}],
        },
    ]
}

r = requests.post(
    "https://app.rocketblue.ai/api/v1/brands/BRAND_ID/topics-prompts/batch",
    headers={"x-spotlight-api-key": "YOUR_API_KEY"},
    json=payload,
)
print(r.json())
```

### Response

```json theme={null}
{
  "topics": [
    { "id": "new-topic-uuid", "name": "Pricing", "prompts": [] }
  ],
  "remainingSlots": 87,
  "promptLimit": 100,
  "orgWideLimit": 500,
  "orgTotalPrompts": 413
}
```

### Errors

`409` — prompt limit exceeded:

```json theme={null}
{
  "message": "Prompt limit exceeded",
  "code": "prompt_limit_exceeded",
  "remainingSlots": 0,
  "promptLimit": 100,
  "orgWideLimit": 500,
  "orgTotalPrompts": 500
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.