> ## 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 prompts

> Update journey stage and/or text on multiple prompts in one request.

Use this to set **customer journey stage** or **prompt text** on many prompts at once. Prefer a single call with `promptIds` when applying the same values to all prompts; use `prompts[]` when each prompt needs different values.

### Request body

Provide **either** `prompts[]` **or** `promptIds` (at least one must be present).

<ParamField body="prompts" type="PromptUpdate[]">
  Per-prompt patches. Each item must include `id` and at least one of `text` or `customerJourney`.

  <Expandable title="PromptUpdate">
    <ParamField body="id" type="string" required>
      Prompt UUID.
    </ParamField>

    <ParamField body="text" type="string">
      New prompt text.
    </ParamField>

    <ParamField body="customerJourney" type="string">
      `"awareness"`, `"consideration"`, `"decision"`, or `"post-purchase"`. Also accepted as `customer_journey`. Pass `null` or empty string to clear the stage.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="promptIds" type="string[]">
  Apply the same `text` and/or `customerJourney` to every listed prompt.
</ParamField>

<ParamField body="text" type="string">
  Shared prompt text when using `promptIds`.
</ParamField>

<ParamField body="customerJourney" type="string">
  Shared journey stage when using `promptIds`.
</ParamField>

### Request

Uniform journey stage on many prompts:

```bash theme={null}
curl -s -X POST \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "promptIds": ["PROMPT_ID_1", "PROMPT_ID_2"],
    "customerJourney": "consideration"
  }' \
  "https://app.rocketblue.ai/api/v1/prompts/batch-update"
```

Per-prompt updates:

```bash theme={null}
curl -s -X POST \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompts": [
      { "id": "PROMPT_ID_1", "customerJourney": "awareness" },
      { "id": "PROMPT_ID_2", "customerJourney": "decision" }
    ]
  }' \
  "https://app.rocketblue.ai/api/v1/prompts/batch-update"
```

### Response

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

<ResponseField name="updatedPrompts" type="object[]">
  Updated prompt objects with `id`, `text`, `topicId`, and `customerJourney`.
</ResponseField>

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

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

```json theme={null}
{
  "updatedCount": 2,
  "updatedPrompts": [
    {
      "id": "prompt-uuid-1",
      "text": "How do teams compare pricing?",
      "topicId": "topic-uuid-1",
      "customerJourney": "consideration"
    },
    {
      "id": "prompt-uuid-2",
      "text": "What should I look for in a vendor?",
      "topicId": "topic-uuid-1",
      "customerJourney": "consideration"
    }
  ],
  "brandIds": ["brand-uuid-123"],
  "brandId": "brand-uuid-123"
}
```
