---
title: "Upload and Translate a Document"
method: POST
path: "/v2/document"
tags: ["TranslateDocuments"]
---

# Upload and Translate a Document

`POST /v2/document`

## Response `200`

The document function returns a JSON object containing the ID and encryption key assigned to the uploaded document. Once received by the server, uploaded documents are immediately encrypted using a uniquely generated encryption key. This key is not persistently stored on the server. Therefore, it must be stored by the client and sent back to the server with every subsequent request that refers to this particular document.

- object
  - `document_id` string — A unique ID assigned to the uploaded document and the translation process. Must be used when referring to this particular document in subsequent API requests.
  - `document_key` string — A unique key that is used to encrypt the uploaded document as well as the resulting translation on the server side. Must be provided with every subsequent API request regarding this particular document.

## Other responses

- `400` — Bad request. Please check error message and your parameters.
- `403` — Authorization failed. Please supply a valid `DeepL-Auth-Key` via the `Authorization` header. This error is also returned when the API key is scoped but does not include the scope required for this endpoint.
- `404` — The requested resource could not be found.
- `413` — The request size exceeds the limit.
- `429` — Too many requests. Please wait and resend your request.
- `456` — Quota exceeded. The character limit has been reached.
- `500` — Internal error.
- `504` — Resource currently unavailable. Try again later.
- `529` — Too many requests. Please wait and resend your request.

---

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