> ## Documentation Index
> Fetch the complete documentation index at: https://docs.topify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Topics

> Retrieve topic groups used to organize prompts.

Topics are groups that organize your prompts by theme or category (e.g., "Product comparisons", "Pricing questions"). Each prompt belongs to one topic.

## List topics

```
GET /projects/{project_id}/topics
```

Returns all topics in a project.

### Path parameters

| Param        | Type          | Description    |
| ------------ | ------------- | -------------- |
| `project_id` | string (UUID) | The project ID |

### Query parameters

None.

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/topics" \
      -H "X-API-Key: tk_live_..."
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    resp = client.get(f"/projects/{project_id}/topics")
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    const resp = await fetch(`${BASE}/projects/${projectId}/topics`, { headers });
    ```
  </Tab>
</Tabs>

### Response

```json theme={null}
{
  "success": true,
  "data": [
    {
      "topic_id": "t1u2v3w4-...",
      "project_id": "a1b2c3d4-...",
      "name": "Product comparisons",
      "description": "Prompts comparing products in the category",
      "created_at": "2026-01-20T14:00:00+00:00"
    },
    {
      "topic_id": "u5v6w7x8-...",
      "project_id": "a1b2c3d4-...",
      "name": "Pricing questions",
      "description": null,
      "created_at": "2026-01-20T14:05:00+00:00"
    }
  ]
}
```

### TopicResponse fields

| Field         | Type              | Nullable | Description        |
| ------------- | ----------------- | -------- | ------------------ |
| `topic_id`    | string (UUID)     | No       | Topic ID           |
| `project_id`  | string (UUID)     | No       | Parent project ID  |
| `name`        | string            | No       | Topic display name |
| `description` | string            | Yes      | Topic description  |
| `created_at`  | string (ISO 8601) | No       | Creation timestamp |

Use the `topic_id` to correlate prompts to their topic group via the `topic_id` field in the [prompts](/api-reference/prompts) and [overview](/api-reference/overview) endpoints.
