---
title: "Document Upload"
method: POST
path: "/documents/upload"
tags: ["Documents"]
---

# Document Upload

`POST /documents/upload`

Prepare a document for direct upload. This endpoint is used to prepare a document for direct upload and subsequent usage in other requests. Refer to the [Direct Upload](https://shipmondo.dev/docs/api/carrier-specific/document_upload) guide for more information.

## Request body

- PrepareDirectUploadRequest
  - `file_name` string, required — the name of the file to be uploaded.
  - `byte_size` integer, required — Byte size of the file to be uploaded.
  - `checksum` string, required — Checksum of the file to be uploaded, calculated as a base64 encoded MD5 hash.
  - `content_type` 'application/pdf', required — The content type of the file to be uploaded.

## Response `200`

Successful.

- PrepareDirectUploadResponse
  - `signed_id` string — A signed identifier for the file to be uploaded, which can be used to reference the file in subsequent requests.
  - `direct_upload` object — Information about how to perform the direct upload of the file.
    - `url` string — Target URL to perform direct upload to
    - `headers` object — Headers to include in the request to perform direct upload. The request must include all keys present here as Headers with their associated value.
      - `Content-Type` string

## Other responses

- `401` — Unauthorized.
- `404` — Resource not found.
- `422` — Invalid or not found parameter(s)

---

[API](https://skmtc.net/shipmondo/apis/shipmondo-api.md) · [All operations](https://skmtc.net/shipmondo/apis/shipmondo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/shipmondo/shipmondo-api/revisions/3b9f91693dec/schema)
