---
title: "Retrieve a file upload URL"
method: GET
path: "/v2/knowledge/{knowledge_id}/upload-file"
tags: ["Knowledge Bases"]
---

# Retrieve a file upload URL

`GET /v2/knowledge/{knowledge_id}/upload-file`

Creates a presigned upload policy for a file that will be attached to a knowledge-base datasource. Submit the returned form fields and file directly to the returned URL.

## Path parameters

- `knowledge_id` string, required

## Query parameters

- `fileName` string, required
- `contentType` string, required
- `datasourceId` string, required

## Response `200`

File upload url successfully retrieved

- GetUploadFileUrlResponse
  - `objectName` string, required
  - `postPolicy` UploadPostPolicy, required
    - `postURL` string, required
    - `formData` object, required
  - `fileId` string, required — Identifier of the file record registered for this upload

## Other responses

- `500` — An error has occured

## Changes

> 257 revisions in range; 71 not diffed.

- **2026-09-01** `359a7831a2f0` — 1 info
  - added the required property `fileId` to the response with the `200` status
- **2026-09-01** `66b8a4902911` — 1 breaking
  - removed the required property `fileId` from the response with the `200` status
- **2026-09-01** `081200e02fe0` — 1 info
  - added the required property `fileId` to the response with the `200` status
- **2026-08-24** `addad33219df` — 1 info
  - endpoint added
- **2026-08-21** `1586760a252f` — 1 breaking
  - api path removed without deprecation

[Full history](https://skmtc.dev/orq-ai/apis/orq-ai-api/changes/v2/knowledge/:knowledge_id/upload-file/get.md)

---

[API](https://skmtc.dev/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.dev/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/orq-ai/orq-ai-api/revisions/359a7831a2f0/schema)
