---
title: "Step 6: Upload Document"
source_url: https://docs.rapyd.net/en/step-6--upload-document.html
lang: en
---

# Step 6: Upload Document

Use the POST method to upload a document to an application field that requires uploading a file such as a scan of a driver’s license. The file must be a Base64-encoded image. Maximum size: 10 MB, and up to 8,000 pixels height or width. The permitted formats include .img, .jpeg, .jpg, .png, and .bmp.

> **Note:**
>
> - Run this method for each field that requires uploading a document.
> - When the upload succeeds, the file is automatically saved in the application.
> - See also [Delete Uploaded Document](https://docs.rapyd.net/en/delete-uploaded-document.md "Delete Uploaded Document")

### Parameters

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - idempotency
  - A unique key that prevents the platform from creating the same object twice.

    See [Idempotency](https://docs.rapyd.net/en/idempotency.md "Idempotency").
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).
- - api_timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Request Path Parameters

- - app_token
  - Identifier of the application. String starting with **app_**.

- - section
  - The section in the application. For example, **shareholder**.

- - field
  - The name of the field in the section. For example, **ownership_ref_type**.

### Request Body Parameters

- - file
  - Base64-encoded image of the document. Maximum size: 10 MB, and up to 8,000 pixels height or width. The permitted formats include *.img, *.jpeg, *.jpg, *.png, *.bmp.
- - original_file_name
  - Original file name of the image.

### Response

The response includes the file token identifier that should be used when it is required to delete this document (See also [Delete Uploaded Document](https://docs.rapyd.net/en/delete-uploaded-document.md "Delete Uploaded Document")).

### Error Messages

- ERROR_MAX_FILE_ONE - You cannot upload more than 1 file.
- ERROR_PATH_PARAMETERS_MISSING:ERROR_PATH_PARAMETERS_MISSING - [APP_TOKEN] -  The request attempted an operation, but one or more required path parameters were missing. The request was rejected. Corrective action: Assign valid values to all of the path parameters listed at the end of the error code.
- ERROR_PATH_PARAMETERS_MISSING:ERROR_PATH_PARAMETERS_MISSING - [SECTION TOKEN OR SECTION_INDEX] - The request attempted an operation, but one or more required path parameters were missing. The request was rejected. Corrective action: Assign valid values to all of the path parameters listed at the end of the error code.
- ERROR_PATH_PARAMETERS_MISSING:ERROR_PATH_PARAMETERS_MISSING - [FIELD_TOKEN OR FIELD_TYPE] - The request attempted an operation, but one or more required path parameters were missing. The request was rejected. Corrective action: Assign valid values to all of the path parameters listed at the end of the error code.
- ERROR_PATH_PARAMETERS_MISSING:ERROR_PATH_PARAMETERS_MISSING - [FILE] - The request attempted an operation, but one or more required path parameters were missing. The request was rejected. Corrective action: Assign valid values to all of the path parameters listed at the end of the error code.
- ERROR_PATH_PARAMETERS_MISSING:ERROR_PATH_PARAMETERS_MISSING - [ORIGINAL_FILE_NAME] - The request attempted an operation, but one or more required path parameters were missing. The request was rejected. Corrective action: Assign valid values to all of the path parameters listed at the end of the error code.

- {base_uri}/verify/api/applications/documents/:app_token/:section/:field

- Upload Document
- ```curl
  curl -X POST
  {base_uri}/verify/api/applications/documents/app_a94f525027bf4f599dc6f640b231647b/shareholder/ownership_ref_type
  -H 'access_key: your-access-key-here'
  -H 'Content-Type: application/json'
  -H 'idempotency: your-idempotency-parameter-here'
  -H 'salt: your-random-string-here'
  -H 'signature: your-calculated-signature-here'
  -H 'timestamp: your-unix-timestamp-here'
  -H 'api_timestamp: your-unix-timestamp-here'
  -d '
  {
      "original_file_name": "ttt.asdvsd.asca.PNG",
      "file": "iVQmCC--"
  }
  '
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "a826224c-a500-436a-b5db-26556b6395a3"
      },
      "data": {
          "token": "file_2e9af8b8dbb94702be521ba7a1b41d83",
          "origin_name": "ttt.asdvsd.asca.PNG",
          "is_deleted": false
      }
  }
  ```
