Files

Complete an upload

Finalises the file after every part has landed.

POST /v1/files/uploads/:session/complete

Permission

The key must be granted files.write

A key without it gets 403 insufficient_scope, with the missing permission named in details.

Takes no body. Assembles the parts into the file and answers with it; the session is finished and cannot take more parts.

Path parameters

Field Type Description
session required string The session to finish.

Request

curl https://api.veruapis.com/v1/files/uploads/:session/complete \
  -X POST \
  -H "Authorization: Bearer vak_live_..." \
  -H "Idempotency-Key: $(uuidgen)"

Idempotency-Key is required on every write. Retrying with the same key returns the original response rather than repeating the operation, so a timeout is something you retry rather than something you investigate.

Response

Answers 201.

Field Type Description
id string
type string file
title string The display name.
filename string The name it was uploaded under.
mime_type string Sniffed from the bytes when it was stored, not taken from what the uploader declared.
size_bytes integer
state string activetrashed
owner_id string
folder_id string Empty for a file in the root.
created_at RFC 3339
updated_at RFC 3339
{
  "data": {
  "id": "0192a1c2-6f3e-7a41-b8d2-5e9f0c3a7b41",
  "type": "file",
  "title": "q3-report.pdf",
  "filename": "q3-report.pdf",
  "mime_type": "application/pdf",
  "size_bytes": 104857600,
  "state": "active",
  "created_at": "2026-09-10T08:10:00Z"
},
  "meta": { "request_id": "req_01j8z9...", "timestamp": "2026-09-02T10:00:00Z" }
}
Worth knowing

Takes no body. The stored content type is sniffed from the assembled bytes rather than taken from what you declared at init.

Errors

Every failure uses the same shape, with a stable string code you can branch on. See the error reference.

Related

POST /v1/files/uploads/:session/complete

session
Sends this body to your own workspace, for real. Edit it before running.