---
title: "Create document"
method: POST
path: "/api/v1/documents"
tags: ["Document"]
---

# Create document

`POST /api/v1/documents`

Create a new document object.

Use this API call to create a document without an annotation. Suitable for creating documents for mime types that cannot be extracted by Rossum. Only one document can be created per request.

The supported mime types are the same as for document import.

## Response `201`

Created

- Document
  - `id` integer — ID of the document
  - `url` string, url — URL of the document
  - `s3_name` string — Storage key of the document file. Internal use only.
  - `parent` string, url, nullable — URL of the parent document (e.g. the zip file it was extracted from)
  - `email` string, uri, nullable — URL of the email object that document was imported by (only for document imported by email).
  - `annotations` string[] — List of annotations related to the document. Usually there is only one annotation.
  - `mime_type` string — MIME type of the document (e.g. `application/pdf`)
  - `creator` string, url, nullable — User that created the annotation.
  - `created_at` string, date-time — Timestamp of document upload or incoming email attachment extraction.
  - `arrived_at` string, date-time — See `created_at`
  - `original_file_name` string — File name of the attachment or upload.
  - `content` string, url — Link to the document's raw content (e.g. PDF file). May be `null` if there is no file associated.
  - `attachment_status` 'null' | 'filtered_by_inbox_resolution' | 'filtered_by_inbox_size' | 'filtered_by_inbox_mime_type' | 'filtered_by_inbox_file_name' | 'filtered_by_hook_custom' | 'filtered_by_queue_mime_type' | 'hook_additional_file' | 'hook_converted' | 'filtered_by_insecure_mime_type' | 'extracted_archive' | 'failed_to_extract' | 'processed' | 'password_protected_archive' | 'broken_image', nullable — Reason why the Document got filtered out on Email ingestion.
  - `metadata` Metadata — Client data. May be used to store e.g. external system object IDs. See [Metadata](/guides/overview#metadata) for more details.

## Other responses

- `400` — Bad Request
- `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)
