Files

Create File

Uploads a file to Flex. The request must be a multipart/form-data upload containing a file part and a purpose part. The file must be a JPEG, PNG, or PDF no larger than 5 MB; PNGs using 16-bit depth or Adam7 interlacing are rejected. The uploaded file can then be referenced by ID elsewhere in the API, for example as evidence on a dispute. Requires the files_write scope.

post/v1/files

Request

  • Base URL
    https://api.withflex.com
  • URL
    https://api.withflex.com/v1/files
  • Auth
    HTTP bearer

Request body multipart/form-data

purpose'account_requirement' | 'additional_verification' | 'business_icon' | 'business_logo' | 'customer_signature' | 'dispute_evidence' | 'document_provider_identity_document' | 'finance_report_run' | 'financial_account_statement' | 'identity_document' | 'identity_document_downloadable' | 'issuing_regulatory_reporting' | 'pci_document' | 'platform_terms_of_service' | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' | 'terminal_android_apk' | 'terminal_reader_splashscreen' required

What the uploaded file will be used for.

filestring binary required

The file to upload (JPEG, PNG, or PDF, max 5MB).

Example request

{
  "purpose": "account_requirement",
  "file": "string"
}

Response

An envelope wrapping a single file object.

Example response

{
  "file": {
    "file_id": "ffile_01J9XR8M3K7VZ8N2YB4WJ6T0RA",
    "purpose": "account_requirement",
    "filename": "string",
    "size": 0,
    "type": "string",
    "created_at": "2026-06-15T14:30:00Z",
    "expires_at": "2026-06-15T14:30:00Z"
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.