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
HeaderRequiredValue
AuthorizationYesBearer sw_api_live_...

Required scope:

tests:read
ParameterTypeRequiredDescription
limitintegerNoNumber of tests to return. Clamped between 1 and 50. Defaults to 50.
test_typestringNoFilter to ai_citations or content_intelligence.
brand_namestringNoExact 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.

StatusMeaning
400Unsupported test_type.
401Missing or invalid API key.
403API key is missing tests:read.