Upload file

POST
/accounts/{accountID}/files

Upload a file and link it to the specified Moov account.

The maximum file size is 20MB. Each account is allowed a maximum of 50 files. Acceptable file types include csv, jpg, pdf, and png.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/files.write scope.

curl -X POST "https://api.moov.io/accounts/{accountID}/files" \
  -H "Authorization: Bearer {token}" \
  -H "X-Moov-Version: v2027.01.00" \
  -F "file=@/path/to/file" \
  -F "filePurpose=representative_verification" \
  -F 'metadata={}'
mc, _ := moov.NewClient()

var accountID string
file, _ := os.Open("/path/to/file.csv")

mc.UploadFile(ctx, accountID, moov.UploadFile{
    FilePurpose: moov.FilePurpose_MerchantUnderwriting,
    Metadata: map[string]string{
        "requirement_id": "business.underwriting-documents-tier-one",
        "other_keys":     "for customer use",
    },
    Filename: "file.csv",
    File:     file,
})
The request completed successfully.
application/json
Describes a file linked to a Moov account.
{
  "fileID": "string",
  "fileName": "logo.png",
  "accountID": "string",
  "filePurpose": "representative_verification",
  "fileStatus": "pending",
  "metadata": "{\"error_code\": \"document-name-mismatch\", \"requirement_id\": \"document.individual.verification\", \"representative_id\": \"c63ab175-251d-497e-a267-7346d087e180\", \"comment\": \"testing comment\"",
  "decisionReason": "not correct file",
  "fileSizeBytes": 0,
  "createdOn": "2019-08-24T14:15:22Z",
  "updatedOn": "2019-08-24T14:15:22Z"
}

x-request-id

string required
A unique identifier used to trace requests.
The server could not understand the request due to invalid syntax.
application/json
{
  "error": "string"
}

x-request-id

string required
A unique identifier used to trace requests.
The request contained missing or expired authentication.

x-request-id

string required
A unique identifier used to trace requests.
The user is not authorized to make the request.

x-request-id

string required
A unique identifier used to trace requests.
The requested resource was not found.

x-request-id

string required
A unique identifier used to trace requests.
The request conflicted with the current state of the target resource.
application/json
{
  "error": "string"
}

x-request-id

string required
A unique identifier used to trace requests.
The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
application/json
{
  "error": "string",
  "file": "string",
  "FileName": "string",
  "filePurpose": "string",
  "metadata": "string"
}

x-request-id

string required
A unique identifier used to trace requests.
Request was refused due to rate limiting.

x-request-id

string required
A unique identifier used to trace requests.
The request failed due to an unexpected error.

x-request-id

string required
A unique identifier used to trace requests.
The request failed because a downstream service failed to respond.

x-request-id

string required
A unique identifier used to trace requests.

Headers

X-Moov-Version

string
Set this header to v2027.01.00 to use the API described in this specification. When omitted, the server defaults to v2024.01.00, the earliest supported version, which may not match the behavior documented here. An unrecognized well-formed version uses the latest supported version that is not newer than the requested version, when one exists. For example, v2026.08.00 uses v2026.07.00. A malformed value, such as 2022, returns a 404 response.
Possible values: v2027.01.00

Path parameters

accountID

string required

Body

multipart/form-data

file

string<binary> required
The file to upload. Valid types are csv, png, jpeg, pdf.

filePurpose

string<enum> required
The purpose of the file being uploaded.
Possible values: business_verification, representative_verification, individual_verification, merchant_underwriting, account_requirement, identity_verification

metadata

object
Additional metadata to be stored with the file.
Additional metadata to be stored with the file.
Show child attributes

metadata

comment

string
Comments or notes about the file.

representative_id

string<ID>
The representative ID that the file is for. Required when filePurpose is representativeVerification.

Response

application/json
Describes a file linked to a Moov account.

accountID

string required

createdOn

string<date-time> required

fileID

string required

fileName

string <=64 characters required

filePurpose

string<enum> required
The purpose of the file being uploaded.
Possible values: business_verification, representative_verification, individual_verification, merchant_underwriting, account_requirement, identity_verification

fileSizeBytes

integer required

fileStatus

string<enum> required
The file's status.
Possible values: pending, approved, rejected

metadata

string<json> required

updatedOn

string<date-time> required

decisionReason

string