---
updatedAt: 2026-09-16T20:15:51.000Z
agentTools:
  projectIndex: https://docs.dlocal.com/llms.txt
---

# Update document

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

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


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "KYC Verifications",
    "version": "1.0.0",
    "license": {
      "name": "Proprietary"
    },
    "description": "KYC Verifications API — create and manage verifications (remittances, payouts on hold, payins on hold, standalone, etc.).\nMandatory fields depend on client type, country, and industry. The verification ID returned is used across Payins and Payouts flows.\n**Environments (from product reference)**  \n**Production:** `https://api.dlocal.com/kyc`  \n**Sandbox:** `https://kyc.dlocal-sbox.com` (paths in this spec are relative to these base URLs).\n**Standard error body** (all KYC error responses use this shape):\n`code`, `message`, and optional `field` (parameter related to the error). See `KycError` and the error codes listed under that schema.\n**Pagination** (list responses such as “get documents”): `items`, `current_page`, `total_pages`, `page_size`, `total`.\nPublic API reference: [Create a verification](https://docs.dlocal.com/reference/create-verification), [Get verification](https://docs.dlocal.com/reference/get-verification), [Get documents](https://docs.dlocal.com/reference/get-verification-documents), [Update document](https://docs.dlocal.com/reference/update-verification-document), [Update verification state (sandbox)](https://docs.dlocal.com/reference/update-verification-state).\n"
  },
  "security": [
    {
      "X-Date": [],
      "X-Login": [],
      "X-Trans-Key": [],
      "Authorization": []
    }
  ],
  "x-explorer-enabled": false,
  "x-proxy-enabled": false,
  "x-samples-languages": [
    "curl"
  ],
  "servers": [
    {
      "url": "https://api.dlocal.com/kyc",
      "description": "Production"
    },
    {
      "url": "https://kyc.dlocal-sbox.com",
      "description": "Sandbox"
    }
  ],
  "tags": [
    {
      "name": "Documents",
      "description": "List required documents and upload or update document content (multipart)."
    }
  ],
  "paths": {
    "/verifications/{verification-id}/documents/{document-id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/VerificationId"
        },
        {
          "$ref": "#/components/parameters/DocumentId"
        }
      ],
      "patch": {
        "tags": [
          "Documents"
        ],
        "summary": "Update document",
        "operationId": "update-verification-document",
        "description": "Updates a specific document using `multipart/form-data`.\n\n**Allowed only when document `status` is `PENDING`.** After `COMPLETED`, `ERROR`, or `APPROVED`, PATCH updates are rejected.\n",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "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": {
                    "type": "string",
                    "description": "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": {
                    "type": "string",
                    "description": "Reference name given by the merchant in their system."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerificationDocument"
                },
                "examples": {
                  "physicalDocument": {
                    "summary": "Physical document example",
                    "value": {
                      "id": "VD-61e2877d-a7e7-4214-8aa7-fdf0aa6538d5",
                      "type": "DOCUMENT",
                      "name": "DOCUMENT_FRONT",
                      "reference_name": "customer-copy-of-id-front",
                      "status": "COMPLETED",
                      "status_detail": "PENDING"
                    }
                  },
                  "field": {
                    "summary": "Field example",
                    "value": {
                      "id": "VD-6d244359-8eaa-4171-a2a5-cee5tt8b18th",
                      "type": "FIELD",
                      "name": "CLIENT_NAME",
                      "value": "John Doe",
                      "status": "COMPLETED",
                      "status_detail": "PENDING"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request — invalid format or file validation error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycError"
                },
                "examples": {
                  "invalidFormat": {
                    "summary": "Invalid format",
                    "value": {
                      "code": "invalid_format",
                      "message": "Invalid format.",
                      "field": "value"
                    }
                  },
                  "fileTooLarge": {
                    "summary": "File too large",
                    "value": {
                      "code": "file_too_large",
                      "message": "Maximum file size 10 MB.",
                      "field": "file"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycError"
                },
                "example": {
                  "code": "invalid_credentials",
                  "message": "Invalid credentials."
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — authentication failed or unauthorized access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycError"
                },
                "example": {
                  "code": "unauthorized",
                  "message": "Unauthorized."
                }
              }
            }
          },
          "404": {
            "description": "Verification or document not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycError"
                },
                "examples": {
                  "verificationNotFound": {
                    "summary": "Verification not found",
                    "value": {
                      "code": "verification_not_found",
                      "message": "The verification was not found.",
                      "field": "verification_id"
                    }
                  },
                  "documentNotFound": {
                    "summary": "Document not found",
                    "value": {
                      "code": "document_not_found",
                      "message": "The document was not found.",
                      "field": "document_id"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycError"
                },
                "example": {
                  "code": "internal_error",
                  "message": "Internal error."
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "VerificationId": {
        "name": "verification-id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "dLocal verification ID in UUID format."
      },
      "DocumentId": {
        "name": "document-id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "dLocal verification document ID."
      }
    },
    "securitySchemes": {
      "X-Date": {
        "type": "apiKey",
        "name": "X-Date",
        "in": "header",
        "description": "ISO-8601 datetime with timezone (e.g. `2018-07-12T13:46:28.629Z`)."
      },
      "X-Login": {
        "type": "apiKey",
        "name": "X-Login",
        "in": "header",
        "description": "Merchant login identifier."
      },
      "X-Trans-Key": {
        "type": "apiKey",
        "name": "X-Trans-Key",
        "in": "header",
        "description": "Transaction key (with `X-Login`) for authentication."
      },
      "Authorization": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "description": "Signature header: `V2-HMAC-SHA256, Signature: {signature}` where the signature is HMAC-SHA256 of `X-Login+X-Date+RequestBody` with your secret key.\n"
      }
    },
    "schemas": {
      "KycError": {
        "type": "object",
        "description": "Standard error envelope for the KYC Verifications API. Typical `code` values (non-exhaustive, per product reference):\n**Generic:** `invalid_verification_status` (400), `internal_error` (500), `unauthorized` / `authentication_failed` (403), `invalid_credentials` (401).\n**Verifications:** `verification_not_found` (404) — `field` may be `verification_id`.\n**Documents:** `document_not_found` (404) — `field` may be `document_id`.\n**Create / file upload:** `invalid_format` (400) — e.g. `client.date_of_birth` in `field`;\n`file_format_not_supported`, `unsupported_mime_type`, `file_too_large` (max 10 MB per file), `file_empty` — often with `file` or `file_name` in `field` when applicable.\n",
        "example": {
          "code": "invalid_format",
          "message": "Invalid format.",
          "field": "client.date_of_birth"
        },
        "properties": {
          "code": {
            "type": "string",
            "description": "Machine-readable error code."
          },
          "message": {
            "type": "string",
            "description": "Human-readable description."
          },
          "field": {
            "type": "string",
            "description": "Parameter or field name associated with the error, when applicable."
          }
        }
      },
      "VerificationDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "dLocal document verification ID.",
            "example": "VD-61e2877d-a7e7-4214-8aa7-fdf0aa6538d5"
          },
          "type": {
            "type": "string",
            "description": "Document type. [See details](https://docs.dlocal.com/reference/document-information#document-type).",
            "example": "DOCUMENT"
          },
          "name": {
            "type": "string",
            "description": "Document name. [See details](https://docs.dlocal.com/reference/document-information#document-names).",
            "example": "DOCUMENT_FRONT"
          },
          "reference_name": {
            "type": "string",
            "description": "Reference name given by the merchant in their system.",
            "example": "customer-copy-of-id-front"
          },
          "value": {
            "type": "string",
            "description": "Value of the document for documents of type `FIELD`.",
            "example": "John Doe"
          },
          "status": {
            "type": "string",
            "description": "Document status. [See details](https://docs.dlocal.com/reference/document-information#document-status).",
            "example": "PENDING"
          },
          "status_detail": {
            "type": "string",
            "description": "Document status detail. [See details](https://docs.dlocal.com/reference/document-information#document-status-details).",
            "example": "PENDING"
          }
        }
      }
    }
  }
}
```