---
title: "Upload Document to Application"
source_url: https://docs.rapyd.net/en/upload-document-to-application.html
lang: en
---

# Upload Document to Application

Upload a document to the application.

Wait for the response for an upload request before initiating the next upload request. Do not execute multiple threads concurrently.

### 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 as a file. Set to **multipart/form-data**.
- - 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).
- - merchant_account_id
  - The merchant account ID that was provided to you when you created the organization. See also [Create Organization](https://docs.rapyd.net/en/create-organization.md "Create Organization").

### Path Parameters

- - app_token
  - The identifier of the application.

- - section
  - The section of the application. For example `company`.

### Request Input File

- - image parameter name
  - Use the `--form` parameter to define the path to the document file on your local machine. Enter the name of the image parameter followed by its path. For example, for the `address_ref` image parameter where the file is located at **C:/path/to/file/address.png**, enter:

    `--form 'address_ref=@"C:/path/to/file/address.png"'`

    Supported file types include '*.pdf', '.*csv', '*.jpeg', '*.jpg', '*.png'. Format of input must follow the `multipart/form-data` protocol. Use the `files` parameter to upload multiple files.

    > **Note:**
    >
    > - * Maximum number of files that can be uploaded in one request is 10.
    > - * Maximum size of files that can be uploaded in one request is 20 MB.
    > - * Document file name should be up to 200 characters long.

### Response Parameters

> **Note:**
>
> Uploading multiple files can return a **Pending Review** status for the files that were uploaded successfully and a **Not Valid** status for the file that was not uploaded due to an error such as an invalid file name. See also the sample on response this page.

The following parameters are returned for each uploaded file:

- - file_name
  - The name of the uploaded file.

- - upload_status
  - Status of the uploaded document. Values include `Pending Review`, `Not Valid`, `Accepted`, and `Rejected`.

- - token
  - The identifier of the uploaded file.

- - error
  - The error that occurred during the upload. Value is `null` when upload is successful.

- - field
  - The field name in the section of the application that the image is linked to.

- /v1/partner/onboarding/application/documents/:app_token/:section/

- Upload Document to Application
- ```curl
  curl -X post 'https://api.rapyd.net/v1/partner/onboarding/application/documents/app_348930548035830/company/' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: multipart/form-data' \
  -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 'merchant_account_id: your-merchant-account-here' \
  --form 'company_documents=@"/Users/John/Documents/2.png"' \
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "0bf00a37-d4a8-47ff-a7da-4ee70db57bbb"
      },
      "data": {
          "file_name": "2.png",
          "upload_status": "Pending Review",
          "token": "file_6bd792ef69804e2a99895405531b6930",
          "error": null,
          "field": "company_documents"
      }
  }
  ```

- Upload Document to Application - Invalid Field
- ```curl
  curl -X post 'https://api.rapyd.net/v1/partner/onboarding/application/documents/app_348930548035830/company' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: multipart/form-data' \
  -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 'merchant_account_id: your-merchant-account-here' \
  --form 'company_documnts=@"/Users/John/Documents/2.png"' \
  ```
- ```json

  {
      "status": {
          "error_code": "ERROR_INVALID_SECTION_OR_FIELD_FOR_UPLOADED_DOCUMENT",
          "status": "ERROR",
          "message": "Error for each file in this request: The request attempted to upload a document, but the specified section and/or field for the document file was invalid. The request was rejected. Corrective action: Rerun the request with a valid field and section.",
          "response_code": "ERROR_INVALID_SECTION_OR_FIELD_FOR_UPLOADED_DOCUMENT",
          "operation_id": "04f5f386-ace0-4ee1-b919-e109fd2f1853"
      }
  }
  ```

- Upload Multiple Documents to Application with one success and one invalid field
- ```curl
  curl -X post 'https://api.rapyd.net/v1/partner/onboarding/application/documents/app_dcfa6baf03574867a439aca0c3eda671/owner' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: multipart/form-data' \
  -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 'merchant_account_id: your-merchant-account-here' \
  --form 'addres=@"/Users/Jane/Automation/scans/sample_pdf.pdf"' \
  --form 'id_img=@"/Users/Jane/Downloads/image1.png"' \
  ```
- ```json

  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "896a04e0-821c-4ed0-b81e-39c663830645"
      },
      "data": [
          {
              "file_name": "sample_pdf.pdf",
              "upload_status": "Not Valid",
              "token": null,
              "error": "ERROR_INVALID_SECTION_OR_FIELD_FOR_UPLOADED_DOCUMENT",
              "message": "The request attempted to upload a document, but the specified section and/or field for the document file was invalid. The request was rejected. Corrective action: Rerun the request with a valid field and section.",
              "field": "addres"
          },
          {
              "file_name": "image1.png",
              "upload_status": "Pending Review",
              "token": "file_054e4e1e7323497787b34d13f62df7be",
              "error": null,
              "message": null,
              "field": "id_img"
          }
      ]
  }
  ```

- Upload Multiple Documents to Application with invalid field error for all files
- ```curl
  curl -X post
  'https://api.rapyd.net/v1/partner/onboarding/application/documents/app_dcfa6baf03574867a439aca0c3eda671/owner' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: multipart/form-data' \
  -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 'merchant_account_id: your-merchant-account-here' \
  --form 'addres=@"/Users/Jane/Automation/scans/sample_pdf.pdf"' \
  --form 'id=@"/Users/Jane/Downloads/image1.png"' \
  ```
- ```json

  {
      "status": {
          "error_code": "ERROR_INVALID_SECTION_OR_FIELD_FOR_UPLOADED_DOCUMENT",
          "status": "ERROR",
          "message": "Error for each file in this request: The request attempted to upload a document, but the specified section and/or field for the document file was invalid. The request was rejected. Corrective action: Rerun the request with a valid field and section.",
          "response_code": "ERROR_INVALID_SECTION_OR_FIELD_FOR_UPLOADED_DOCUMENT",
          "operation_id": "d6e7735c-e4aa-48e5-9259-a19dfeef285b"
      }
  }
  ```

- File upload to Application with error for invalid section
- ```curl
  curl -X post
  'https://api.rapyd.net/v1/partner/onboarding/application/documents/app_dcfa6baf03574867a439aca0c3eda671/own' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: multipart/form-data' \
  -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 'merchant_account_id: your-merchant-account-here' \
  --form 'address_ref=@"/Users/Jane/Automation/scans/sample_pdf.pdf"' \
  --form 'id_img=@"/Users/Jane/Downloads/image1.png"' \
  ```
- ```json

  {
      "status": {
          "error_code": "ERROR_INVALID_SECTION_FOR_UPLOADED_DOCUMENT",
          "status": "ERROR",
          "message": "The request attempted to upload a document, but the specified section for the document file was invalid. The request was rejected. Corrective action: Rerun the request with a valid section.",
          "response_code": "ERROR_INVALID_SECTION_FOR_UPLOADED_DOCUMENT",
          "operation_id": "42c8503d-a177-46a7-8dbe-56150abe2169"
      }
  }
  ```

- File upload to Application with error for invalid file type
- ```curl
  curl -X post
  'https://api.rapyd.net/v1/partner/onboarding/application/documents/app_dcfa6baf03574867a439aca0c3eda671/owner' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: multipart/form-data' \
  -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 'merchant_account_id: your-merchant-account-here' \
  --form 'address_ref=@"/Users/Jane/Automation/scans/sample.gif"' \
  ```
- ```json

  {
      "error_code": "ERROR_UPLOAD_FILE_UNSUPPORTED_FILE_TYPE",
      "status": "ERROR",
      "message": "The request tried to upload a file, but the file type was not supported. The request was rejected. Corrective action: Upload a file that is of a supported file type.",
      "response_code": "ERROR_UPLOAD_FILE_UNSUPPORTED_FILE_TYPE",
      "operation_id": "eb6d9a6a-f967-43d9-a1d3-f4baa90cee01"
  }
  ```
