Skip to main content
POST
Create a file
See Errors for the common errors every v2 endpoint can return.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string
required

Idempotency key A unique key for this request, up to 255 characters. Retrying with the same key and body returns the original response instead of performing the operation again.

Required string length: 1 - 255
Example:

"3f1c9a52-7d4e-4b8a-9c21-6e0f5d2a8b14"

Body

multipart/form-data
file
file
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. The filename can be up to 255 characters, must not contain a path separator (/ or \), and must not be empty, whitespace only, ., or ... The file itself can be a PDF, JPEG, or PNG of up to 50 MB (50,000,000 bytes), and its leading bytes must match the declared format.

type
enum<string>
required

The file's type. It decides which objects the file can link to. See the type enum for every value, grouped by the object it links to.

Available options:
adverse_action_notice,
board_resolution,
cardholder_agreement,
credit_agreement,
deposit_agreement,
electronic_signature_agreement,
lead_funds_transfer_agreement,
lead_privacy_policy,
loan_agreement,
notice_of_incompleteness,
ownership_chart,
partner_privacy_policy,
payment_authorization,
periodic_statement,
personal_guarantee_agreement,
power_of_attorney,
pre_approval_terms,
register_of_shareholders,
signatory_authorization_letter,
terms_of_use_policy,
truth_in_lending_document,
adverse_media,
bank_statement,
certificate_of_good_standing,
consular_id,
drivers_license,
exchange_listing_certificate,
exchange_listing_notice,
financial_statement,
formation_document,
id_selfie,
inheritance_letter,
investigation_report,
investment_record,
national_id,
partnership_agreement,
passport,
permanent_residency_id,
provincial_id,
public_record,
salary_verification_letter,
sale_agreement,
social_security_card,
state_id,
tax_certificate,
tax_return,
utility_bill
Example:

"loan_agreement"

metadata
object

A set of key-value pairs that can be used to store additional information related to this object. The whole object is limited to 256 KiB, measured on its JSON-encoded form. An empty key is refused. Keys and values have no individual limits beyond that aggregate.

Response

File object created.

id
string
required

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

Pattern: ^file_\w+$
Example:

"file_7RwQ2mK9pL4xT1vN8jS5"

type
enum<string>
required

The file's type. It decides which objects the file can link to. See the type enum for every value, grouped by the object it links to.

Available options:
adverse_action_notice,
board_resolution,
cardholder_agreement,
credit_agreement,
deposit_agreement,
electronic_signature_agreement,
lead_funds_transfer_agreement,
lead_privacy_policy,
loan_agreement,
notice_of_incompleteness,
ownership_chart,
partner_privacy_policy,
payment_authorization,
periodic_statement,
personal_guarantee_agreement,
power_of_attorney,
pre_approval_terms,
register_of_shareholders,
signatory_authorization_letter,
terms_of_use_policy,
truth_in_lending_document,
adverse_media,
bank_statement,
certificate_of_good_standing,
consular_id,
drivers_license,
exchange_listing_certificate,
exchange_listing_notice,
financial_statement,
formation_document,
id_selfie,
inheritance_letter,
investigation_report,
investment_record,
national_id,
partnership_agreement,
passport,
permanent_residency_id,
provincial_id,
public_record,
salary_verification_letter,
sale_agreement,
social_security_card,
state_id,
tax_certificate,
tax_return,
utility_bill
Example:

"loan_agreement"

created_at
string<date-time>
required

The UTC time at which Lead received the last byte of the file.

Example:

"2026-09-14T14:22:01Z"

metadata
object
required

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

Example:
uploaded_by
enum<string>

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.
Available options:
partner,
lead
Example:

"partner"

file_name
string

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

Maximum string length: 255
Example:

"loan_agreement_acct_4471.pdf"

content_type
string

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

Example:

"application/pdf"

size_bytes
integer<int64>

Size of the file in bytes.

Example:

184233

checksum
string

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

Example:

"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"