---
title: "POST /upload-documents"
method: POST
path: "/upload-documents"
---

# POST /upload-documents

`POST /upload-documents`

## Request body

- UploadDocuments
  - `callback` CallbackLink, required
    - `url` string, required
    - `expires_in` integer, required
  - `upload_context` string, nullable
  - `files` FileToUpload[], required
    - `file_name` string, required
    - `session_file_id` string, required — This is a client provided id to differentiate between multiple files that are being uploaded in the same session
    - `document_id` string

## Response `200`

- DocumentUploadSessionInitialization
  - `upload_ui_url` string, required
  - `expires_in` integer, required
  - `max_size_in_bytes` integer, required

## Changes

- **2022-02-14** `3eaa30d597fd` — 1 warning, 3 info
  - removed the request property `server_context`
  - api operation id `/upload-documents` removed and replaced with ``
  - api tag `Upload` removed
  - added the new optional request property `upload_context`

[Change history](https://skmtc.dev/buildingsmart/apis/opencde-documents-api/changes/upload-documents/post.md)

---

[API](https://skmtc.dev/buildingsmart/apis/opencde-documents-api.md) · [All operations](https://skmtc.dev/buildingsmart/apis/opencde-documents-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/buildingsmart/opencde-documents-api/revisions/3eaa30d597fd/schema)
