Skip to content

List tests

Lists saved AI Visibility and Content Intelligence tests owned by the authenticated user.

This endpoint is useful for dashboards, agents, and integrations that need to discover existing Console tests before reading results or rerunning work.

Only AI Visibility and Content Intelligence tests are included.

GET /v1/tests
Header Required Value
Authorization Yes Bearer sw_api_live_...

Required scope:

tests:read
Parameter Type Required Description
limit integer No Number of tests to return. Clamped between 1 and 50. Defaults to 50.
test_type string No Filter to ai_citations or content_intelligence.
brand_name string No Exact brand-name filter after normalization.
Terminal window
curl -s "https://api.sleepwalker.ai/v1/tests?limit=20&test_type=ai_citations" \
-H "Authorization: Bearer sw_api_live_..."

The same request in Python and JavaScript:

Python
import requests
resp = requests.get(
"https://api.sleepwalker.ai/v1/tests",
headers={"Authorization": "Bearer sw_api_live_..."},
params={"limit": 20, "test_type": "ai_citations"},
)
resp.raise_for_status()
print(resp.json())
JavaScript
const params = new URLSearchParams({ limit: "20", test_type: "ai_citations" });
const resp = await fetch(`https://api.sleepwalker.ai/v1/tests?${params}`, {
headers: { Authorization: "Bearer sw_api_live_..." },
});
const data = await resp.json();
console.log(data);
{
"tests": [
{
"id": "47d0f0e2-...",
"name": "Homepage",
"brand_name": "Sleepwalker",
"test_type": "ai_citations",
"url": "https://www.sleepwalker.ai",
"created_at": "2026-06-01T10:00:00Z",
"updated_at": "2026-06-04T09:00:00Z"
}
],
"excluded_test_types": ["technical_monitoring"]
}

The exact test payload may include additional Console fields depending on test type. Treat unknown fields as additive.

Status Meaning
400 Unsupported test_type.
401 Missing or invalid API key.
403 API key is missing tests:read.
422 limit has the wrong type.

API-key rate limits and temporary storage errors are documented in Errors.