Update monitoring
curl --request PATCH \
--url https://www.qwairy.co/api/v1/brands/{brandId}/monitoring \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"frequency": "<string>",
"analysisWeekDay": {},
"analysisMonthDay": {},
"autoGenerateAnswers": true,
"models": [
"<string>"
],
"dryRun": true
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/monitoring"
payload = {
"frequency": "<string>",
"analysisWeekDay": {},
"analysisMonthDay": {},
"autoGenerateAnswers": True,
"models": ["<string>"],
"dryRun": True
}
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({
frequency: '<string>',
analysisWeekDay: {},
analysisMonthDay: {},
autoGenerateAnswers: true,
models: ['<string>'],
dryRun: true
})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/monitoring', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Brands
Update monitoring
Change a workspace’s monitoring schedule and selected models, pause monitoring, or validate a change with dryRun before saving it with the ETag.
PATCH
https://www.qwairy.co
/
api
/
v1
/
brands
/
{brandId}
/
monitoring
Update monitoring
curl --request PATCH \
--url https://www.qwairy.co/api/v1/brands/{brandId}/monitoring \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"frequency": "<string>",
"analysisWeekDay": {},
"analysisMonthDay": {},
"autoGenerateAnswers": true,
"models": [
"<string>"
],
"dryRun": true
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/monitoring"
payload = {
"frequency": "<string>",
"analysisWeekDay": {},
"analysisMonthDay": {},
"autoGenerateAnswers": True,
"models": ["<string>"],
"dryRun": True
}
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({
frequency: '<string>',
analysisWeekDay: {},
analysisMonthDay: {},
autoGenerateAnswers: true,
models: ['<string>'],
dryRun: true
})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/monitoring', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Updates the supplied monitoring settings. Read Get monitoring
first and copy its ETag. When the GET returns computed defaults, the initial
ETag is
Supply at least one editable field. Setting
See Error codes for authentication, plan, idempotency
and server errors. On
"0"; this PATCH persists the first settings. Fields you omit keep
the defaults: no model and no automatic answers.
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.
NONE, DAILY, WEEKLY or MONTHLY. NONE stops the workspace
schedule: prompts that inherit it stop, while prompts with their own
frequency keep running, as in the dashboard.Day from 1 to 7 for weekly monitoring. On the first persisted settings,
omitted or null uses the current weekday; later updates can store null.
Day from 1 to 28 for monthly monitoring. On the first persisted settings,
omitted or null uses day 1; later updates can store null.
Replacement list of 1 to 20 enabled Qwairy model codes. Read the currently
selected codes with GET. Unknown or disabled codes are rejected.
NONE preserves per-prompt
monitoring settings. Work accepted before the change may still finish.
Response
Returns200, a new ETag and a monitoring object with the same fields
as Get monitoring.
paused reflects whether frequency is NONE; isDefault is false
once settings are persisted.
Synthetic request and response
This example assumes the current monitoring ETag is"3".
curl -X PATCH "https://www.qwairy.co/api/v1/brands/$BRAND_ID/monitoring" \
-H "Authorization: Bearer $QWAIRY_API_TOKEN" \
-H 'If-Match: "3"' \
-H "Content-Type: application/json" \
-d '{"frequency":"NONE"}'
{
"monitoring": {
"brandId": "b1c2d3e4-0000-4000-8000-000000000000",
"frequency": "NONE",
"paused": true,
"analysisWeekDay": 1,
"analysisMonthDay": 1,
"autoGenerateAnswers": true,
"models": ["openai-gpt"],
"lastAnalysisDate": null,
"version": 4,
"isDefault": false
}
}
Errors
| Status | Code | Cause |
|---|---|---|
| 400 | INVALID_REQUEST | Invalid schedule or empty/unavailable model selection |
| 403 | INSUFFICIENT_PLAN | A selected model is a premium model your plan does not include |
| 404 | RESOURCE_NOT_FOUND | Workspace is missing or inaccessible |
| 412 | PRECONDITION_FAILED | Monitoring changed since your read |
| 428 | PRECONDITION_REQUIRED | If-Match is missing |
429, honor Retry-After; writes can return
503 SERVICE_UNAVAILABLE if the write limiter is unavailable.
