Files

Upload a File to Lead and get back a Lead-issued id you can reference immediately.

post/v2/files

Request

  • Base URL
    https://api.sandbox.lead.bank
  • URL
    https://api.sandbox.lead.bank/v2/files
  • Auth
    HTTP bearer

Headers

Idempotency-Keystring required

Idempotency key

Request body multipart/form-data

filestring binary required

The file bytes, as a standard multipart file part. The part's own filename and Content-Type headers — which HTTP clients set automatically — are your declaration of the file's name and format, and are returned as file_name and content_type.

typestring required

The file's type. Must be a valid enum.

The accepted values are grouped by the object the file can be linked to.

Application and User Account

ach_authorization, adverse_action_notice, autopay_authorization_agreement, beneficial_ownership_document, cardholder_agreement, credit_agreement, deposit_agreement, electronic_signature_agreement, lead_funds_transfer_agreement, lead_privacy_policy, loan_agreement, notice_of_incompleteness, partner_privacy_policy, periodic_statement, personal_guarantee_agreement, pre_approval_terms, proof_of_authority, terms_of_use_policy, truth_in_lending_document

Entity

adverse_media, bank_statement, certificate_of_good_standing, consular_id, drivers_license, financial_statement, formation_document, id_selfie, investigation_report, name_certificate, national_id, partnership_agreement, passport, permanent_residency_id, proof_of_address, proof_of_place_on_stock_exchange, provincial_id, public_record, social_security_card, source_of_wealth, state_id, tax_certificate, tax_return, utility_bill

metadataobject

A set of key-value pairs that can be used to store additional information related to this object.

Example request

{
  "type": "loan_agreement"
}

Response

File object created.

idstring

Unique ID of the file. Use this to link the file to Entity, Application and User Account objects.

uploaded_by'partner' | 'lead'

Who created the file. Set by Lead, not declarable on upload.

  • partner: created by you through the files API.
  • lead: reserved for files Lead itself creates.
file_namestring

The filename you declared, taken from the uploaded part's filename header.

typestring

The file's type. Must be a valid enum.

The accepted values are grouped by the object the file can be linked to.

Application and User Account

ach_authorization, adverse_action_notice, autopay_authorization_agreement, beneficial_ownership_document, cardholder_agreement, credit_agreement, deposit_agreement, electronic_signature_agreement, lead_funds_transfer_agreement, lead_privacy_policy, loan_agreement, notice_of_incompleteness, partner_privacy_policy, periodic_statement, personal_guarantee_agreement, pre_approval_terms, proof_of_authority, terms_of_use_policy, truth_in_lending_document

Entity

adverse_media, bank_statement, certificate_of_good_standing, consular_id, drivers_license, financial_statement, formation_document, id_selfie, investigation_report, name_certificate, national_id, partnership_agreement, passport, permanent_residency_id, proof_of_address, proof_of_place_on_stock_exchange, provincial_id, public_record, social_security_card, source_of_wealth, state_id, tax_certificate, tax_return, utility_bill

content_typestring

MIME type of the file (e.g., application/pdf), taken from the Content-Type header of the multipart file part.

size_bytesinteger

Size of the file in bytes.

checksumstring

A SHA-256 checksum digest of the file bytes, computed by Lead as the file is received.

created_atstring date-time

The ISO-8601 timestamp at which the file was created.

updated_atstring date-time

The ISO-8601 timestamp at which the file was last updated.

metadataobject

A set of key-value pairs that can be used to store additional information related to this object.

Example response

{
  "id": "file_7RwQ2mK9pL4xT1vN8jS5",
  "uploaded_by": "partner",
  "file_name": "loan_agreement_acct_4471.pdf",
  "type": "loan_agreement",
  "content_type": "application/pdf",
  "size_bytes": 184233,
  "checksum": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "created_at": "2026-09-14T14:22:01Z",
  "updated_at": "2026-09-14T14:22:01Z",
  "metadata": {}
}

Changes