---
title: "Import document (deprecated)"
method: POST
path: "/api/v1/queues/{id}/upload"
tags: ["Queue"]
deprecated: true
---

# Import document (deprecated)

`POST /api/v1/queues/{id}/upload`

> **Deprecated.**

**Deprecated**: Please note that this upload endpoint is deprecated in favor of [create upload](/api/upload#create-upload) endpoint.

Uploads a document to the queue (starting in the importing state). This creates a document object and an empty annotation object.

The file can be sent as a part of multipart/form-data or, alternatively, in the request body. Multiple files upload is supported, the total size of the data uploaded may not exceed 40 MB. UTF-8 filenames are supported.

You can also specify additional properties using form field:
- metadata could be passed using `metadata` form field. Metadata will be set to newly created annotation object.
- values could be passed using `values` form field. It may be used to initialize datapoint values by setting the value of `rir_field_names` in the schema.

Upload endpoint also supports basic authentication to enable easy integration with third-party systems.

## Path parameters

- `id` integer, required

## Response `201`

Created

- object
  - `results` object[]
    - `annotation` string, uri — URL of created annotation.
    - `document` string, uri — URL of created document.
  - `annotation` string, uri — (Obsolete) URL of first created annotation.
  - `document` string, uri — (Obsolete) URL of first created document.

## Other responses

- `400` — Invalid input data.
- `401` — The username/password is invalid or token is invalid (e.g. expired).
- `403` — Insufficient permission, missing authentication, invalid CSRF token and similar issue.
- `404` — The specified resource was not found.
- `409` — Conflict
- `413` — Payload too large (especially for files uploaded).
- `429` — Request rate is too high, wait before sending more requests. See [Rate Limiting](/guides/overview#rate-limiting) for more details.
- `500` — Server failure while processing the request.
- `502` — Invalid response from the upstream server.
- `503` — We're temporarily offline for maintenance. Please try again later.
- `504` — Upstream server could not complete the request in time.

---

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