Files API

The Files API lets you upload supporting documents (e.g. invoices, contracts, receipts) and reference them on other Esca resources by an opaque id.

When to use it

Currently used by:

  • Fiat payouts — attach a payment-purpose document to POST /v1/payouts/fiat via the paymentPurposeAttachmentId field.

Lifecycle

1. POST /v1/files           → returns { id: "file_<uuid>" }
2. Reference that id on a   → e.g. paymentPurposeAttachmentId on a fiat payout
   resource that accepts it

A file id is private to the account that uploaded it. Referencing a file id from a different account returns 400 Bad Request.

Limits

Limit Value
Max file size 5 MB
Allowed content types Any (the integration that consumes the file decides what it accepts)

Authentication

All endpoints require authentication via API key in the X-Api-Key header — the same as every other /v1/* endpoint.