> ## 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

> 컬렉션을 만들고, 목록을 보고, 상세를 조회하고, 삭제합니다.

Collections는 여러 URL을 하나의 통합 지식 그래프(TKG)에 수집해 **브랜드별 프라이빗 코퍼스**를 구축합니다.

**개인 액세스 토큰(Personal Access Token)이 필요합니다.** 마스터 키는 사용할 수 없습니다.

## POST /api/v1/collections

새 Collection(브랜드 코퍼스)을 생성합니다.

### Request Body

<ParamField body="name" type="string" required>
  Collection 이름. 예: `"Hyundai UK"`
</ParamField>

<ParamField body="slug" type="string">
  선택적 URL 친화적 식별자. 예: `"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

인증된 사용자의 모든 Collection 목록을 반환합니다.

<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}

Collection 상세 정보와 수집된 URL 목록 및 처리 상태를 반환합니다.

<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}

Collection과 연결된 모든 데이터(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>
