Add pages to monitor
curl --request POST \
--url https://www.qwairy.co/api/v1/brands/{brandId}/site-diagnostics/pages \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"urls": [
"<string>"
]
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/site-diagnostics/pages"
payload = { "urls": ["<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({urls: ['<string>']})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/site-diagnostics/pages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Site diagnostics
Add pages to monitor
Add up to 50 URLs on the workspace domain to Site Diagnostics. Each URL reports whether it was added, already monitored, invalid or outside the domain.
POST
https://www.qwairy.co
/
api
/
v1
/
brands
/
{brandId}
/
site-diagnostics
/
pages
Add pages to monitor
curl --request POST \
--url https://www.qwairy.co/api/v1/brands/{brandId}/site-diagnostics/pages \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"urls": [
"<string>"
]
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/site-diagnostics/pages"
payload = { "urls": ["<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({urls: ['<string>']})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/site-diagnostics/pages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Adds up to 50 URLs on the workspace domain to the monitored pages. A URL that is
already monitored is reported as
See Error codes for authentication, plan, idempotency and server errors. A token without write access returns
already_monitored. Adding a page does not
audit it: start an audit with Start a page audit.
Requires an active Business, Agency Business or Enterprise plan, and an API token with write access enabled by an Owner or Manager. See Writing data for activation, idempotency, conditional requests and error handling.
Unique key for this operation, at most 255 characters. Completed responses replay for 24 hours.
Response
Returns200 with an items array, one entry for each submitted URL.
| Outcome | Meaning |
|---|---|
added | The page is now monitored; pageId identifies it |
already_monitored | The page was already monitored |
invalid | The URL is not valid |
outside_domain | The URL is not on the workspace domain |
pageId is null when the URL was not added.
Synthetic request and response
curl -X POST "https://www.qwairy.co/api/v1/brands/$BRAND_ID/site-diagnostics/pages" \
-H "Authorization: Bearer $QWAIRY_API_TOKEN" \
-H "Idempotency-Key: monitor-pages-001" \
-H "Content-Type: application/json" \
-d '{"urls":["https://example.com/pricing","https://example.com/blog","https://other.example/page"]}'
{
"items": [
{
"url": "https://example.com/pricing",
"outcome": "added",
"pageId": "99999999-0000-4000-8000-000000000000"
},
{
"url": "https://example.com/blog",
"outcome": "already_monitored",
"pageId": "99999999-1111-4000-8000-000000000000"
},
{
"url": "https://other.example/page",
"outcome": "outside_domain",
"pageId": null
}
]
}
Errors
| Status | Code | Cause |
|---|---|---|
400 | INVALID_REQUEST | The list is empty, has more than 50 URLs, or is malformed |
404 | RESOURCE_NOT_FOUND | The workspace is missing or inaccessible |
409 | CONFLICT | The request conflicts with the current state |
403 API_KEY_READ_ONLY. On 429, honor Retry-After. If the write limiter is unavailable or writes are suspended, the request returns 503 SERVICE_UNAVAILABLE and nothing changes.
