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

# Add URLs

> Ingest URLs into a collection, track progress, and inspect the resulting graph.

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/{id}/ingest

Ingest one or more URLs into the collection's unified knowledge graph. Each URL is fetched, parsed by LLM, and its claims/predictions/edges are extracted and accumulated into the collection TKG.

**Note:** Ingestion is synchronous: the request completes only after all URLs are processed. Each URL typically takes 10–30 seconds. Send URLs one at a time for best reliability.

### Request Body

<ParamField body="url" type="string" required>
  URL to ingest. The page is crawled and its claims/predictions/edges are extracted into the collection TKG.
</ParamField>

<ParamField body="visibility" type="string" default="private">
  Access control for the ingested content. `private` or `public`.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.factagora.com/api/v1/collections/5966a861-6952-482a-a9d0-041ad5d2a667/ingest" \
    -H "Authorization: Bearer fa_your_personal_token" \
    -H "Content-Type: application/json" \
    -d '{"url": "https://www.hyundai.com/uk/en/models/ioniq6.html"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "collection_id": "5966a861-6952-482a-a9d0-041ad5d2a667",
    "tkg_id": "a97a1a3c-2d52-4c17-af83-1332e826af8d",
    "url": "https://www.hyundai.com/uk/en/models/ioniq6.html",
    "status": "completed",
    "ingest_source_id": "a5e00acc-aa4a-4ba6-bc44-1409fe64ef81",
    "claims_count": 18,
    "predictions_count": 2
  }
  ```
</ResponseExample>

***

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

Remove a source URL from the collection (soft detach). The source's extracted claims, predictions, and chunks are retained in the database but are no longer associated with this collection.

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

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

***

## GET /api/v1/collections/{id}/ingest-status

Poll the ingestion status for all URLs in the collection.

### Status values

| Status       | Meaning                                                             |
| ------------ | ------------------------------------------------------------------- |
| `processing` | Ingestion in progress                                               |
| `completed`  | Successfully ingested                                               |
| `failed`     | Ingestion failed (e.g. URL unreachable or content extraction error) |

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

<ResponseExample>
  ```json 200 theme={null}
  {
    "collection_id": "5966a861-6952-482a-a9d0-041ad5d2a667",
    "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"
      },
      {
        "ingest_source_id": "b1343b92-defb-4818-aec2-5ed4299f704b",
        "url": "https://www.hyundai.com/uk/en/models/ioniq6/trims-prices.html",
        "status": "processing",
        "created_at": "2026-06-29T02:00:30.000000+00:00"
      }
    ],
    "summary": {
      "total": 2,
      "processing": 1,
      "completed": 1,
      "failed": 0
    }
  }
  ```
</ResponseExample>

***

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

Get the collection's unified knowledge graph as nodes and edges, shaped for graph visualization.

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

<ResponseExample>
  ```json 200 theme={null}
  {
    "nodes": [
      {
        "id": "13c7afac-ea6f-44b4-807e-01c7935a8bfc",
        "label": "IONIQ 6 electric range up to 338 miles",
        "type": "CLAIM"
      },
      {
        "id": "7872d682-7c9c-43ba-a3e6-6a729b57ce06",
        "label": "Hyundai Electric Vehicle Range Will Expand and Improve",
        "type": "PREDICTION"
      }
    ],
    "edges": [
      {
        "from": "13c7afac-ea6f-44b4-807e-01c7935a8bfc",
        "to": "7872d682-7c9c-43ba-a3e6-6a729b57ce06",
        "label": "SUPPORTS"
      }
    ]
  }
  ```
</ResponseExample>
