---
title: "PATCH /documents/{document_id}"
method: PATCH
path: "/documents/{document_id}"
tags: ["Document"]
---

# PATCH /documents/{document_id}

`PATCH /documents/{document_id}`

## Request

- Base URL: `https://api-docs.simplepdf.com/api/v1`
- URL: `https://api-docs.simplepdf.com/api/v1/documents/{document_id}`
- Auth: HTTP bearer

Update the document

## Path parameters

- `document_id` string, uuid, required

## Request body

- object
  - `name` string
  - `type` union: edit_and_submit: fields can be positioned and modified before submitting. submit: fields cannot be changed nor edited.
    - 'edit_and_submit'
    - 'submit'

## Response `200`

Successful response

- object
  - `id` string, required
  - `name` string, required
  - `type` union, required: edit_and_submit: fields can be positioned and modified before submitting. submit: fields cannot be changed nor edited.
    - 'edit_and_submit'
    - 'submit'
  - `embed_url` string, required: Public link a recipient opens to fill and submit the document in the SimplePDF editor, standalone or embedded in an iframe. No expiry; anyone with the link can use it. Append `?prefill=<prefill_id>` to apply a prefill.
  - `created_at` string, required
  - `updated_at` string, required
  - `url` string, required: Short-lived presigned URL to download the original document PDF (the uploaded file, not a submission). Expires shortly after issue; fetch a fresh one per use.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `404`: Not found
- `429`: Too many requests

---

[API](https://skmtc.dev/simplepdf/apis/simplepdf-api.md) · [All operations](https://skmtc.dev/simplepdf/apis/simplepdf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/simplepdf/apis/simplepdf-api/revisions/0bc3915e908d?raw)
