---
title: "Upload a new or update existing document"
method: POST
path: "/rest/document"
tags: ["sts-controller"]
---

# Upload a new or update existing document

`POST /rest/document`

Uploads a document with metadata. The endpoint consumes data in multipart/form-data format. When using `cookieAuth`, the `JSESSIONID` cookie from the `/api/login` response should be used.

## Response `200`

Document upload successful

- Result
  - `message` string
  - `result` unknown
  - `url` string
  - `documentId` string

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Document not found
- `500` — Internal Server Error

---

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