List Domains
Returns every domain the calling key or user can access.
curl --request GET \
--url https://api.aiclicks.io/api/v1/domains \
--header 'Authorization: Bearer ak_live_xxx'
import httpx, os
resp = httpx.get(
"https://api.aiclicks.io/api/v1/domains",
headers={"Authorization": f"Bearer {os.environ['AICLICKS_API_KEY']}"},
)
resp.raise_for_status()
for d in resp.json()["data"]["items"]:
print(d["id"], d["website"])
const resp = await fetch("https://api.aiclicks.io/api/v1/domains", {
headers: { Authorization: `Bearer ${process.env.AICLICKS_API_KEY}` },
});
const { data } = await resp.json();
for (const d of data.items) console.log(d.id, d.website);
{
"data": {
"items": [
{
"id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
"name": "Acme Inc.",
"website": "acme.com",
"created_at": "2025-11-04T12:18:55.218Z"
},
{
"id": "1be5a7d4-0c8b-4f1d-9b9c-12b9c0e5d2a4",
"name": "Globex",
"website": "globex.com",
"created_at": "2026-01-22T09:02:11.503Z"
}
],
"total": 2,
"page": 1,
"size": 2,
"total_pages": 1
},
"generated_at": "2026-06-08T14:30:11.218Z"
}
{
"detail": "Invalid or revoked API key"
}
{
"detail": "API access is not enabled for this team. Contact support@aiclicks.io."
}
{
"detail": "Too many requests. Please try again later."
}
For an API-key caller, this returns domains belonging to the key's team, filtered by the per-user allowed_domains allowlist of the user who created the key. For a JWT caller, it spans every team the user is a member of. Teams without Developer Access enabled are silently omitted.
This endpoint is not paginated — domain lists are typically small (under 25 per team). The list-envelope fields (total, page, size, total_pages) are present for consistency but always trivial.
Authorizations
Your API key formatted as Bearer ak_live_<your-key>. Create one in the dashboard under Settings → Developers.
Optional UUID for log correlation. If omitted, we generate one and echo it back in the response.
Query parameters
This endpoint takes no query parameters.
Response
The list payload.
Array of domains the caller can access.
UUID. Use this as {domain_id} in every other endpoint.
Display name. May be null if the domain was never named.
Bare hostname, e.g. acme.com — no scheme, no path.
ISO-8601 timestamp of when the domain was added to AIClicks.
Total matching rows. Always equals items.length (endpoint isn't paginated).
Current page (1-indexed). Always 1.
Items in this page. Equals items.length.
Total pages. Always 1.
ISO-8601 timestamp of when the server produced (or cached) this response.
Response headers
| Header | Description |
|---|---|
X-Cache | HIT or MISS. Indicates whether the response came from cache. |
X-Request-Id | Unique request id. Echoes incoming if you set one. |
X-RateLimit-Limit | Max requests per minute for this key. |
X-RateLimit-Remaining | Requests remaining in current minute. |
X-RateLimit-Reset | Unix epoch seconds when the window resets. |
Caching
Cached for 1 hour per (user_id, key_team). Two users in the same team have separate cache entries because their allowed_domains may differ. Watch the X-Cache header to know whether you hit the cache.
Errors
Missing, malformed, or revoked API key.
Team's developer_access flag is off. Body matches the 403 example above.
Rate limit exceeded. Inspect the Retry-After header for how long to wait.
Empty result
If the caller has access to zero domains (allowlist excludes everything, team is empty, or all teams are filtered out), the response is a successful 200 with an empty list:
{
"data": { "items": [], "total": 0, "page": 1, "size": 0, "total_pages": 1 },
"generated_at": "2026-06-08T14:30:11.218Z"
}