Update a prompt
curl --request PATCH \
--url https://www.qwairy.co/api/v1/brands/{brandId}/prompts/{promptId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"text": "<string>",
"status": "<string>",
"frequency": {},
"monitoringEnabled": true,
"keywordId": {},
"tagIds": [
"<string>"
],
"countryCodes": [
"<string>"
],
"modelIds": [
"<string>"
]
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/prompts/{promptId}"
payload = {
"text": "<string>",
"status": "<string>",
"frequency": {},
"monitoringEnabled": True,
"keywordId": {},
"tagIds": ["<string>"],
"countryCodes": ["<string>"],
"modelIds": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"If-Match": "<if-match>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: '<authorization>',
'If-Match': '<if-match>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: '<string>',
status: '<string>',
frequency: {},
monitoringEnabled: true,
keywordId: {},
tagIds: ['<string>'],
countryCodes: ['<string>'],
modelIds: ['<string>']
})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/prompts/{promptId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Prompts
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.
PATCH
https://www.qwairy.co
/
api
/
v1
/
brands
/
{brandId}
/
prompts
/
{promptId}
Update a prompt
curl --request PATCH \
--url https://www.qwairy.co/api/v1/brands/{brandId}/prompts/{promptId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"text": "<string>",
"status": "<string>",
"frequency": {},
"monitoringEnabled": true,
"keywordId": {},
"tagIds": [
"<string>"
],
"countryCodes": [
"<string>"
],
"modelIds": [
"<string>"
]
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/prompts/{promptId}"
payload = {
"text": "<string>",
"status": "<string>",
"frequency": {},
"monitoringEnabled": True,
"keywordId": {},
"tagIds": ["<string>"],
"countryCodes": ["<string>"],
"modelIds": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"If-Match": "<if-match>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: '<authorization>',
'If-Match': '<if-match>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: '<string>',
status: '<string>',
frequency: {},
monitoringEnabled: true,
keywordId: {},
tagIds: ['<string>'],
countryCodes: ['<string>'],
modelIds: ['<string>']
})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/prompts/{promptId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Updates only the supplied fields. Read the prompt with
Supply at least one editable field.
See Error codes for authentication, plan, idempotency
and server errors. On
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 for
idempotency, conditional requests and error handling.
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.ACTIVE or ARCHIVED. Archiving retains answers and history; setting
ACTIVE restores the prompt.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.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.
Complete replacement list of up to 30 model identifiers for this prompt only.
An empty array restores the workspace models.
Response
Returns200, 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
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"}'
{
"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 |
429, honor Retry-After; writes can return
503 SERVICE_UNAVAILABLE if the write limiter is unavailable.
