v2.files

Upload a seller document to Stripe (platform key)

Platform keys only. Uploads a seller document and returns its id for documents on POST /accounts. With a live key the bytes go straight to Stripe as a File (file_…); with a sandbox key nothing reaches Stripe — the same validation runs and Cooud answers a simulated receipt file_sim_<ULID> (livemode: false) that only a sandbox onboarding may reference. purpose is the API vocabulary (identity_document, proof_of_liveness, company_verification, account_requirement); Cooud maps it to the Stripe purpose. Cooud never stores the bytes — only the file id, the owning platform, the purpose and the size — and a file id can only be referenced by the platform that uploaded it. jpeg, png or pdf, at most 8 MiB.

post/files

Request

  • Base URL: https://api.cooud.com/v2
  • URL: https://api.cooud.com/v2/files
  • Auth: HTTP bearer

Headers

Cooud-Compat-Datestring date required

Required per-request compat-date. Format: ISO calendar date YYYY-MM-DD. Merchants pinned to an older date have their request and response transformed by every gate whose appliesAfter is strictly greater than this date.

Response

The file receipt, owned by this platform: a Stripe File under a live key, a simulated file_sim_… under a sandbox key.

idstring required

Stripe file id (file_…) with a live key, or a simulated file_sim_<ULID> with a sandbox key; usable in documents on POST /accounts by this platform only, under a key of the same environment.

object'file' required
purpose'identity_document' | 'proof_of_liveness' | 'company_verification' | 'account_requirement' required
sizeinteger required

Bytes.

livemodeboolean required

true when the file was uploaded to Stripe (live key); false for a simulated sandbox receipt.

createdinteger required

Unix epoch seconds.

request_idstring required

Changes

No recorded changes to this operation across all 1 revision of this API.