PromptsList Topics

List Topics

Every topic defined for a domain — the lookup you use to turn topic names into topic_ids before adding a prompt.

curl --request GET \
  --url 'https://api.aiclicks.io/api/v1/topics?domain_id=8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3' \
  --header 'Authorization: Bearer ak_live_xxx'
{
  "data": [
    {
      "id": "d4e5f6a7-2222-4ccc-8ddd-000000000001",
      "name": "Pricing",
      "description": "Prompts about plans, cost, and value comparisons."
    },
    {
      "id": "d4e5f6a7-2222-4ccc-8ddd-000000000002",
      "name": "Integrations",
      "description": "Prompts about connecting to other tools and APIs."
    },
    {
      "id": "d4e5f6a7-2222-4ccc-8ddd-000000000003",
      "name": "Security",
      "description": null
    }
  ],
  "domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
  "generated_at": "2026-08-18T10:00:11.218Z"
}

Returns the domain's topic catalog: one row per topic with its name and optional description. Use it to resolve human-readable topic names into the topic_ids that `` expects — the write endpoint takes ids, not names, so this is the read you call first.

This is a deliberately trimmed view: each row is just id, name, and description. Internal fields (domain_id, created_at) are not returned. Archived topics are excluded.

domain_id is a required query parameter. Use `` to discover which domains the calling key can access.

Authorizations

header
Authorizationstring
Required

Your API key formatted as Bearer ak_live_<your-key>. Create one in the dashboard under Settings → Developers.

header
X-Request-Idstring

Optional UUID for log correlation. If omitted, we generate one and echo it back in the response.

Query parameters

query
domain_idstring
Required

UUID of the domain. Find domains via ``. Omitting this returns 400.

Response

dataarray
Required

One row per non-archived topic on the domain.

domain_idstring
Required

Echo of the requested domain.

generated_atstring
Required

ISO-8601 timestamp of when the server produced (or cached) this response.

Response headers

HeaderDescription
X-CacheHIT or MISS. Indicates whether the response came from cache.
X-Request-IdUnique request id. Echoes incoming if you set one.
X-RateLimit-LimitMax requests per minute for this key.
X-RateLimit-RemainingRequests remaining in current minute.
X-RateLimit-ResetUnix epoch seconds when the window resets.

Caching

Cached for 1 hour per domain_id. A newly created topic appears after the TTL expires.

Errors

400 Bad Requesterror

domain_id query parameter missing. Body points you at /api/v1/domains.

401 Unauthorizederror

Missing, malformed, or revoked API key.

403 Forbiddenerror

Team's developer_access flag is off, the domain belongs to a team your API key is not scoped to, or your allowed_domains allowlist excludes it.

404 Not Founderror

domain_id is malformed, does not exist, or your user is not a member of its team.

429 Too Many Requestserror

Rate limit exceeded. Inspect the Retry-After header for how long to wait.

Empty result

A domain with no topics returns a successful 200 with an empty list:

{
  "data": [],
  "domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
  "generated_at": "2026-08-18T10:00:11.218Z"
}