---
title: "Update document"
method: PATCH
path: "/verifications/{verification-id}/documents/{document-id}"
tags: ["Documents"]
---

# Update document

`PATCH /verifications/{verification-id}/documents/{document-id}`

## Request

- Base URL: `https://api.dlocal.com/kyc`
- URL: `https://api.dlocal.com/kyc/verifications/{verification-id}/documents/{document-id}`
- Auth: API key in header `X-Date` and API key in header `X-Login` and API key in header `X-Trans-Key` and API key in header `Authorization`

Updates a specific document using `multipart/form-data`.

**Allowed only when document `status` is `PENDING`.** After `COMPLETED`, `ERROR`, or `APPROVED`, PATCH updates are rejected.

## Request body `multipart/form-data`

- object
  - `file` string, binary: File with the content of the document to update. It's used for documents of type `DOCUMENT` and should only be used if `value` is not sent. Each file name must include an extension, which can be either `.jpeg`, `.png`, or `.pdf`. Please [refer to the list of acceptable documents](https://docs.dlocal.com/reference/document-information).
  - `value` string: Value of the document to update. It's used for documents of type `FIELD` and should only be used if `file` is not sent.
  - `reference_name` string: Reference name given by the merchant in their system.

## Response `200`

Successful response

- VerificationDocument
  - `id` string: dLocal document verification ID.
  - `type` string: Document type. [See details](https://docs.dlocal.com/reference/document-information#document-type).
  - `name` string: Document name. [See details](https://docs.dlocal.com/reference/document-information#document-names).
  - `reference_name` string: Reference name given by the merchant in their system.
  - `value` string: Value of the document for documents of type `FIELD`.
  - `status` string: Document status. [See details](https://docs.dlocal.com/reference/document-information#document-status).
  - `status_detail` string: Document status detail. [See details](https://docs.dlocal.com/reference/document-information#document-status-details).

## Other responses

- `400`: Bad request — invalid format or file validation error
- `401`: Unauthorized — invalid credentials
- `403`: Forbidden — authentication failed or unauthorized access
- `404`: Verification or document not found
- `500`: Internal server error

---

[API](https://skmtc.dev/dlocal/apis/kyc-verifications.md) - [All operations](https://skmtc.dev/dlocal/apis/kyc-verifications/llms.txt) - [OpenAPI document](https://skmtc.dev/dlocal/apis/kyc-verifications/revisions/249db3120bc4?raw)
