---
title: "Confirm Upload"
method: POST
path: "/api/files/confirm-upload"
tags: ["files"]
---

# Confirm Upload

`POST /api/files/confirm-upload`

## Request

- Base URL: `https://app.ctlsurf.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.ctlsurf.com/api/files/confirm-upload`
- Auth: HTTP bearer

Confirm a completed upload and create the database record.

Call this after successfully uploading a file to the presigned URL.
Verifies the file exists in storage before creating the record.
Optionally creates a file block on the specified page.

## Request body

- ConfirmUploadRequest: Request to confirm a completed upload.
  - `file_id` string, uuid, required
  - `s3_key` string, required
  - `filename` string, required
  - `mime_type` string, required
  - `page_id` string, uuid, nullable
  - `title` string, nullable
  - `create_block` boolean

## Response `200`

Successful Response

- ConfirmUploadResponse: Response after confirming upload.
  - `file` FileResponse, required: Schema for file response.
    - `original_filename` string, required
    - `mime_type` string, required
    - `size_bytes` integer, required
    - `width` integer, nullable
    - `height` integer, nullable
    - `id` string, uuid, required
    - `user_id` string, uuid, required
    - `page_id` string, uuid, nullable
    - `block_id` string, uuid, nullable
    - `filename` string, required
    - `s3_key` string, required
    - `created_at` string, date-time, required
    - `url` string, nullable
    - `has_extracted_text` boolean
  - `block` object, nullable
  - `message` string

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ctlsurf/apis/notebook-control-plane.md) · [All operations](https://skmtc.dev/ctlsurf/apis/notebook-control-plane/llms.txt) · [OpenAPI document](https://skmtc.dev/ctlsurf/apis/notebook-control-plane/revisions/ddfbbe20d5ce?raw)
