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.
Endpoint
Section titled “Endpoint”GET /v1/testsAuthentication
Section titled “Authentication”| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer sw_api_live_... |
Required scope:
tests:readQuery Parameters
Section titled “Query Parameters”| 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. |
Example Request
Section titled “Example Request”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:
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())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);Response
Section titled “Response”{ "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.
Errors
Section titled “Errors”| Status | Meaning |
|---|---|
400 | Unsupported test_type. |
401 | Missing or invalid API key. |
403 | API key is missing tests:read. |