---
title: "Presign Upload"
method: POST
path: "/v1/presign_upload/"
tags: ["Public"]
---

# Presign Upload

`POST /v1/presign_upload/`

## Request

- Base URL: `https://api.koncile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.koncile.ai/v1/presign_upload/`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/koncile/apis/koncile-api/docs/v1/presign_upload/post.ts> (a function with typed inputs; its response is checked against the schema)

Mint short-lived, write-only upload URLs (step 1 of 2).

PUT each file's bytes to its `upload_url`, then call /v1/register_upload/
with the `upload_id`s to start extraction.

Nothing here is billable — the charge happens when the file is registered
and actually processed.

## Request body

- PublicPresignUploadRequest: Request body for POST /v1/presign_upload/.
  - `filenames` string[], required: File names with extension, one upload URL is returned per name. This is the name the document will carry in Koncile.
  - `folder_id` integer, nullable: Folder to place the documents in. Optional.
  - `template_id` integer, nullable: Template to extract with. Optional — when omitted, the documents are classified against the company's templates.
  - `metadata` string, nullable: Optional JSON string stored alongside the upload.

## Response `200`

Successful Response

- PublicPresignUploadResponse: Response for POST /v1/presign_upload/.
  - `files` PublicPresignedFile[]: One entry per requested filename, in the order requested.
    - `upload_id` integer, required: Opaque handle for this upload. Pass it back to /v1/register_upload/ once the file has been uploaded.
    - `filename` string, required: The file name this slot was issued for.
    - `upload_url` string, required: Write-only URL accepting a single HTTP PUT of the file's bytes. It grants no read, list or delete, and expires after `expires_in` seconds.
    - `expires_in` integer, required: Seconds until `upload_url` stops being accepted.

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-25** `1446f41e0cd4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/koncile/apis/koncile-api/changes/v1/presign_upload/post.md)

---

[API](https://skmtc.dev/koncile/apis/koncile-api.md) - [All operations](https://skmtc.dev/koncile/apis/koncile-api/llms.txt) - [OpenAPI document](https://skmtc.dev/koncile/apis/koncile-api/revisions/37187db89a87?raw)
