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

# Manage collections

> Create, list, inspect, and delete collections.

Collections let you build a **per-brand private corpus** by ingesting multiple URLs into one unified knowledge graph (TKG).

**Requires a personal access token.** Master keys are rejected.

## POST /api/v1/collections

Create a new collection (brand corpus).

### Request Body

<ParamField body="name" type="string" required>
  Collection name, e.g. `"Hyundai UK"`.
</ParamField>

<ParamField body="slug" type="string">
  Optional URL-friendly identifier, e.g. `"hyundai-uk"`.
</ParamField>

<RequestExample>
  <CodeGroup>
    ```bash cURL theme={null}
    curl -X POST "https://api.factagora.com/api/v1/collections/{id}/answer" \
      -H "Authorization: Bearer fa_your_personal_token" \
      -H "Content-Type: application/json" \
      -d '{"question": "What is the IONIQ 6 electric range?"}'
    ```

    ```python Python theme={null}
    import requests

    resp = requests.post(
        f"https://api.factagora.com/api/v1/collections/{collection_id}/answer",
        headers={"Authorization": "Bearer fa_your_personal_token"},
        json={"question": "What is the IONIQ 6 electric range?"},
    )
    data = resp.json()
    ```

    ```typescript TypeScript theme={null}
    const resp = await fetch(
      `https://api.factagora.com/api/v1/collections/${collectionId}/answer`,
      {
        method: "POST",
        headers: {
          Authorization: "Bearer fa_your_personal_token",
          "Content-Type": "application/json",
        },
        body: JSON.stringify({ question: "What is the IONIQ 6 electric range?" }),
      },
    );
    const data = await resp.json();
    ```
  </CodeGroup>
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "5966a861-6952-482a-a9d0-041ad5d2a667",
    "name": "Hyundai UK",
    "slug": null,
    "status": "active",
    "created_at": "2026-06-29T01:34:47.817583+00:00"
  }
  ```
</ResponseExample>

***

## GET /api/v1/collections

List all collections owned by the authenticated user.

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.factagora.com/api/v1/collections" \
    -H "Authorization: Bearer fa_your_personal_token"
  ```
</RequestExample>

***

## GET /api/v1/collections/{id}

Get a collection including its ingested URL list and their processing status.

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.factagora.com/api/v1/collections/5966a861-6952-482a-a9d0-041ad5d2a667" \
    -H "Authorization: Bearer fa_your_personal_token"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "5966a861-6952-482a-a9d0-041ad5d2a667",
    "name": "Hyundai UK",
    "slug": null,
    "status": "active",
    "created_at": "2026-06-29T01:34:47.817583+00:00",
    "sources": [
      {
        "ingest_source_id": "a5e00acc-aa4a-4ba6-bc44-1409fe64ef81",
        "url": "https://www.hyundai.com/uk/en/models/ioniq6.html",
        "status": "completed",
        "created_at": "2026-06-29T02:00:30.000000+00:00"
      }
    ]
  }
  ```
</ResponseExample>

***

## DELETE /api/v1/collections/{id}

Delete a collection and all its associated data (sources, chunks, claims, predictions, TKG).

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.factagora.com/api/v1/collections/5966a861-6952-482a-a9d0-041ad5d2a667" \
    -H "Authorization: Bearer fa_your_personal_token"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "deleted": true
  }
  ```
</ResponseExample>
