---
title: "Deprecated in favour of init_multipart_upload"
method: POST
path: "/api/v1/documents/init_upload"
---

# Deprecated in favour of init_multipart_upload

`POST /api/v1/documents/init_upload`

## Request body

- object
  - `filename` string, required — The filename of the document to be uploaded, optionally gzipped (and ending in `.gz` or `.gzip`). Filenames should only contain alphanumeric characters, dashes, underscores, and periods.
  - `size` integer, required — The size of the file in bytes.

## Response `200`

OK

- object
  - `additional_fields` object, required — Additional fields to include in the upload.
  - `document_id` string, required — The `document_id` of the uploaded document.
  - `upload_url` string, required — The URL to POST the document to.

---

[API](https://skmtc.net/onecodex/apis/one-codex-api-v1.md) · [All operations](https://skmtc.net/onecodex/apis/one-codex-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onecodex/one-codex-api-v1/versions/fe9d9bfc8a6a/schema)
