Skip to content

Get test

Returns one saved AI Visibility or Content Intelligence test owned by the authenticated user.

Use this when an integration already has a test_id and needs the current saved configuration before reading reports or queueing related actions.

GET /v1/tests/{test_id}
HeaderRequiredValue
AuthorizationYesBearer sw_api_live_...

Required scope:

tests:read
ParameterTypeDescription
test_idstringSaved test UUID.
Terminal window
curl -s "https://api.sleepwalker.ai/v1/tests/47d0f0e2-0000-0000-0000-000000000000" \
-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/47d0f0e2-0000-0000-0000-000000000000",
headers={"Authorization": "Bearer sw_api_live_..."},
)
resp.raise_for_status()
print(resp.json())
JavaScript
const resp = await fetch(
"https://api.sleepwalker.ai/v1/tests/47d0f0e2-0000-0000-0000-000000000000",
{ headers: { Authorization: "Bearer sw_api_live_..." } },
);
const data = await resp.json();
console.log(data);
{
"test": {
"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"]
}
StatusMeaning
401Missing or invalid API key.
403API key is missing tests:read, or the test type is not exposed.
404Test was not found or does not belong to the authenticated user.