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.
Endpoint
Section titled “Endpoint”GET /v1/tests/{test_id}Authentication
Section titled “Authentication”| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer sw_api_live_... |
Required scope:
tests:readPath Parameters
Section titled “Path Parameters”| Parameter | Type | Description |
|---|---|---|
test_id | string | Saved test UUID. |
Example Request
Section titled “Example Request”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:
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())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);Response
Section titled “Response”{ "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"]}Errors
Section titled “Errors”| Status | Meaning |
|---|---|
401 | Missing or invalid API key. |
403 | API key is missing tests:read, or the test type is not exposed. |
404 | Test was not found or does not belong to the authenticated user. |