Bulk update prompts
curl --request POST \
--url https://www.qwairy.co/api/v1/brands/{brandId}/prompts/bulk \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"operation": "<string>",
"promptIds": [
"<string>"
]
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/prompts/bulk"
payload = {
"operation": "<string>",
"promptIds": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'Idempotency-Key': '<idempotency-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({operation: '<string>', promptIds: ['<string>']})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/prompts/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Prompts
Bulk update prompts
Apply one operation to up to 20 prompts, such as archive, restore, frequency, topic or tags, preview it with dryRun, and inspect each result.
POST
https://www.qwairy.co
/
api
/
v1
/
brands
/
{brandId}
/
prompts
/
bulk
Bulk update prompts
curl --request POST \
--url https://www.qwairy.co/api/v1/brands/{brandId}/prompts/bulk \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"operation": "<string>",
"promptIds": [
"<string>"
]
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/prompts/bulk"
payload = {
"operation": "<string>",
"promptIds": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'Idempotency-Key': '<idempotency-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({operation: '<string>', promptIds: ['<string>']})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/prompts/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Applies the requested operation to each accessible prompt and returns a per-item
outcome. This endpoint uses idempotency instead of per-prompt ETags. Use
Update a prompt when you need a
conditional update against one known version.
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.
Required for
frequency: NONE, DAILY, WEEKLY, MONTHLY, or null to
inherit the workspace schedule.Required for
tags: the complete replacement list, at most 50 tag UUIDs. Send
[] to remove all tags except the system tag of each prompt, if any. In a
workspace created from v1.21, Qwairy sets the Branded or Non-branded system
tag from each prompt text. The id of either system tag in this list is ignored,
and the tag each prompt already carries is kept.Validate the request and return the per-item results without changing
anything.
Response
Returns200 with operation, updated and results. Inspect every
result even when the HTTP request succeeds:
| Item status | Meaning |
|---|---|
updated | The prompt changed |
unchanged | The requested state already applied |
not_found | The prompt is absent or outside this workspace and team |
updated counts only items whose status is updated.
Archiving keeps answers and history.
Synthetic request and response
curl -X POST "https://www.qwairy.co/api/v1/brands/$BRAND_ID/prompts/bulk" \
-H "Authorization: Bearer $QWAIRY_API_TOKEN" \
-H "Idempotency-Key: archive-prompt-batch-001" \
-H "Content-Type: application/json" \
-d '{"operation":"archive","promptIds":["33333333-0000-4000-8000-000000000000","44444444-0000-4000-8000-000000000000"]}'
{
"operation": "archive",
"updated": 1,
"results": [
{ "promptId": "33333333-0000-4000-8000-000000000000", "status": "updated" },
{
"promptId": "44444444-0000-4000-8000-000000000000",
"status": "unchanged"
}
]
}
Errors
Invalid operations or payloads return400 INVALID_REQUEST. An inaccessible
workspace, topic or tag returns 404 RESOURCE_NOT_FOUND.
Missing prompt IDs are reported per item instead.
See Error codes for authentication, plan, idempotency
and server errors. On 429, honor Retry-After; writes can return
503 SERVICE_UNAVAILABLE if the write limiter is unavailable.
