These docs are for v3. Click to read the latest docs for v4.

Upload Document

Upload a document to an account

Accounts Overview

curl -X POST \
  'http://api.testwyre.com/v3/accounts/AC-DM4ANREWUNJ/individualGovernmentId?documentType=DRIVING_LICENSE&documentSubType=FRONT&timestamp=1426252182534' \
  --upload-file '/Users/user/passport.pdf' \
  -H 'Content-Type: application/pdf' \
  -H 'Authorization: Bearer SK-XXX-XXX-XXX' \

curl -X POST \
  'http://api.testwyre.com/v3/accounts/AC-DM4ANREWUNJ/individualGovernmentId?documentType=DRIVING_LICENSE&documentSubType=BACK&timestamp=1426252182534' \
  --upload-file '/Users/user/passport.pdf' \
  -H 'Content-Type: application/pdf' \
  -H 'Authorization: Bearer SK-XXX-XXX-XXX' \
// Upload js file used in conjunction with index.html in the next tab
const input = document.querySelector('input');

let uploadToWyre = (data) =>{
    let timestamp = Date.now();
    let headers = {};
    headers['Authorization'] = 'Bearer SK-XXXXXX-XXXXXX-XXXXXX-XXXXXX';
    headers['Content-Type'] = 'image/png';
    fetch(`https://api.testwyre.com/v3/accounts/AC_XXXXXXXXXX/individualGovernmentId?documentType=PASSPORT&timestamp=${timestamp}`, {
        method: "POST",
        headers:  headers,
        body: data.target.files[0]
        }).then(res => {
        console.log("Request complete! response:", res);
    });
}

input.addEventListener('input', uploadToWyre);
<!-- Use in conjusction with upload.js on the previous tab -->
<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">

  <title>Wyre Document Upload</title>

</head>

<body>
    <input type="file">
    <script src="./upload.js"></script>
</body>
</html>

📘

Supported FieldIds

Note: Only individualProofOfAddress,individualGovernmentId, and individualAchAuthorizationForm fieldIds are accepted through this endpoint. Please see Account Overview for more information.

individualAchAuthorizationForm is used to verify a payment method after our compliance team has requested further verification.

Supported Document Types

Document TypeContent-Type(s)
PDFapplication/pdf
Imagesimage/jpeg
image/png
Word Document (.doc or .docx)application/msword
application/vnd.openxmlformats-officedocument.wordprocessingml.document

📘

Max Filesize

Maximum file upload size is 7.75MB

Path Params
string
required

The ID of the Account that the document belongs to

string
required

The fieldId that the uploaded document is associated with. Only fieldId values of type DOCUMENT will accept a document upload.

Query Params
string

For individualGovernmentId fieldId, you could specify the documentType. Possible values are GOVT_ID, DRIVING_LICENSE, PASSPORT_CARD and PASSPORT

string

For individualGovernmentId fieldId, you could specify the documentSubType, possible values are FRONT and BACK. It is required to upload both FRONT and BACK for GOVT_ID, DRIVING_LICENSE and PASSPORT_CARD.

Body Params
file
required

The document to upload.

Response

Language
Credentials
Bearer
URL
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json