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

# Source Actions

> Enqueue, re-ingest, or delete knowledge base sources

## Path Parameters

<ParamField path="sourceId" type="string" required>
  Knowledge source ID (UUID).
</ParamField>

## Enqueue File Ingestion

After creating a file source and uploading the file to its presigned URL, enqueue ingestion:

`POST /v1/knowledge-sources/{sourceId}/enqueue`

<ParamField body="jobId" type="string" required>
  The `jobId` returned when you created the file source. It must belong to this source — a mismatched or unknown `jobId` returns `400 invalid_request`.
</ParamField>

<ParamField body="forceReindex" type="boolean">
  Rebuild the source even if it was previously ingested.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.telzino.com/v1/knowledge-sources/22222222-2222-2222-2222-222222222222/enqueue \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "jobId": "33333333-3333-3333-3333-333333333333",
      "forceReindex": false
    }'
  ```
</RequestExample>

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

## Re-ingest a Source

Re-ingesting creates a new ingestion job and rebuilds the source's vectors.

`POST /v1/knowledge-sources/{sourceId}/reingest`

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.telzino.com/v1/knowledge-sources/22222222-2222-2222-2222-222222222222/reingest \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": {
      "jobId": "33333333-3333-3333-3333-333333333333"
    }
  }
  ```
</ResponseExample>

## Download a Source File

`GET /v1/knowledge-sources/{sourceId}/download`

Returns a short-lived presigned URL for the source's original uploaded file. `GET` that
URL to retrieve the bytes — it carries the original filename, so a browser saves it
under the name it was uploaded with rather than the internal storage key.

Only **file** sources can be downloaded. A URL source returns `400 invalid_request`; its
address is already available in the `url` field from [List Sources](/api-reference/knowledge-bases/sources).

The URL expires after `expiresIn` seconds — request a new one rather than storing it.

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.telzino.com/v1/knowledge-sources/22222222-2222-2222-2222-222222222222/download \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```bash Fetch the file theme={null}
  curl -o guide.pdf "URL_FROM_RESPONSE"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": {
      "url": "https://s3.amazonaws.com/...",
      "fileName": "guide.pdf",
      "fileMime": "application/pdf",
      "expiresIn": 300
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": "invalid_request",
    "error_description": "Only file sources can be downloaded. URL sources expose their address in the `url` field."
  }
  ```
</ResponseExample>

## Delete a Source

`DELETE /v1/knowledge-sources/{sourceId}`

Deletes the source row, related storage objects, and enqueues worker-side vector deletion.

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://api.telzino.com/v1/knowledge-sources/22222222-2222-2222-2222-222222222222 \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```
</RequestExample>

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