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

# Update a prompt

> Edit, archive or restore one prompt, including its schedule, topic, tags, countries and models, using the ETag you last read in the If-Match header.

Updates only the supplied fields. Read the prompt with
`view=configuration` first, including when restoring an archived prompt.
Archiving preserves its stored answers and history.

Requires an active Business, Agency Business or Enterprise plan. Use an API token with write access enabled. See [Writing data](https://docs.qwairy.co/developers/writing-data.md) for
idempotency, conditional requests and error handling.

**Authorization** `string` *required*

Bearer token for your team.

**If-Match** `string` *required*

Copy the complete `ETag` from the latest GET, including its quotes.

**brandId** `string` *required*

Workspace identifier. The workspace must belong to the token's team.

**promptId** `string` *required*

Prompt UUID within the workspace.

**text** `string`

Replacement text, 1 to 500 characters after trimming, as in the dashboard.
When the text changes in a workspace created from v1.21, Qwairy sets the
`Branded` or `Non-branded` system tag again from the new text.

**status** `string`

`ACTIVE` or `ARCHIVED`. Archiving retains answers and history; setting
`ACTIVE` restores the prompt.

**frequency** `string | null`

`NONE`, `DAILY`, `WEEKLY`, `MONTHLY`, or `null` to inherit the workspace
schedule.

**monitoringEnabled** `boolean`

Whether the prompt participates in scheduled monitoring.

**keywordId** `string | null`

Topic UUID in this workspace, or `null` to detach its current topic.

**tagIds** `string[]`

Complete replacement list of up to 50 tag UUIDs from this workspace. An empty
array removes all tags except the `Branded` or `Non-branded` system tag the
prompt carries, if any. In a workspace created from v1.21, Qwairy sets that tag
from the prompt text. The id of either system tag in this list is ignored, and
the tag the prompt carries is kept.

**countryCodes** `string[]`

Complete replacement list of up to 50 uppercase two-letter country codes from
the workspace country catalog. An empty array restores the workspace default
country.

**modelIds** `string[]`

Complete replacement list of up to 30 model identifiers for this prompt only.
An empty array restores the workspace models.

Supply at least one editable field.

## Response

Returns `200`, an updated `ETag` and a `prompt` object with the fields
shown below, including `countryCodes` and `modelIds` (empty arrays mean the
workspace defaults). There is no top-level `success` field. Dates use ISO 8601.
The `version` is an opaque concurrency value.

## Synthetic request and response

```bash theme={null}
curl -i "https://www.qwairy.co/api/v1/brands/$BRAND_ID/prompts/$PROMPT_ID?view=configuration" \
  -H "Authorization: Bearer $QWAIRY_API_TOKEN"
# Assume the returned ETag is "2".
curl -X PATCH "https://www.qwairy.co/api/v1/brands/$BRAND_ID/prompts/$PROMPT_ID" \
  -H "Authorization: Bearer $QWAIRY_API_TOKEN" \
  -H 'If-Match: "2"' \
  -H "Content-Type: application/json" \
  -d '{"status":"ARCHIVED"}'
```

```json theme={null}
{
  "prompt": {
    "id": "33333333-0000-4000-8000-000000000000",
    "text": "Which CRM tools support small sales teams?",
    "status": "ARCHIVED",
    "frequency": null,
    "monitoringEnabled": true,
    "keywordId": null,
    "tagIds": ["55555555-0000-4000-8000-000000000000"],
    "countryCodes": [],
    "modelIds": [],
    "version": 3,
    "createdAt": "2026-09-01T09:00:00.000Z",
    "updatedAt": "2026-09-01T10:00:00.000Z"
  }
}
```

## Errors

| Status | Code | Cause |
| - | - | - |
| 400 | `INVALID_REQUEST` | No editable field or invalid field value |
| 404 | `RESOURCE_NOT_FOUND` | Workspace, prompt, topic or tag is missing or inaccessible |
| 409 | `CONFLICT` | Duplicate prompt text or a workspace that cannot be edited |
| 412 | `PRECONDITION_FAILED` | The ETag is stale or invalid |
| 428 | `PRECONDITION_REQUIRED` | `If-Match` is missing |

See [Error codes](https://docs.qwairy.co/developers/errors.md) for authentication, plan, idempotency
and server errors. On `429`, honor `Retry-After`; writes can return
`503 SERVICE_UNAVAILABLE` if the write limiter is unavailable.


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