/v1/filesRequest an upload URL
file:createCreates a pending file and returns a short-lived URL to PUT the bytes to directly. Call POST /v1/files/{id}/done once the upload finishes.
Request body CreateFileRequest
purposestring requiredWhat the file is for. Decides where it may be used and which size cap applies.
logojddoccsvoutputnamestring requiredThe file name.
max 200 charscontentTypestring requiredThe MIME type of the bytes you will upload.
max 100 charssizeBytesinteger requiredThe size you intend to upload, in bytes. Checked against your plan’s per-file cap BEFORE a URL is minted, and verified for real at finalization — an upload URL cannot enforce a size by itself, so a declared size that turns out to be a lie is caught then.
min 1, max 262144000
Responses
201The pending file and its upload URLfileFile requiredThe reserved file record. It holds no bytes yet.
idstring requiredThe file id.
purposestring requiredWhat the file is for. Purpose decides where it can be used and which size cap applies.
statusstring requiredWhere the upload stands. A file is only usable once it has been finalized; a created-but-never-finalized file holds no bytes.
namestring requiredThe file name you supplied.
contentTypestring requiredThe MIME type you declared.
sizeBytesnumber | null requiredThe real size, measured at finalization. Null before then — the size you declared at creation is a check, not a fact.
uploadedBystring | null requiredThe member or key that uploaded it. Null when unknown.
createdAtstring requiredWhen the file record was created, as an ISO 8601 instant.
updatedAtstring requiredWhen it last changed, as an ISO 8601 instant.
uploadUrlstring requiredPUT your bytes directly to this URL. It carries its own authorization, so do not send your API credential with it.
expiresAtstring requiredWhen `uploadUrl` stops working, as an ISO 8601 instant. Create the file again to get a fresh one.
400Invalid input, or larger than your plan allowscodestring requiredStable machine-readable error code. Branch on this, never on the numeric status.
bad_requestunauthorizedsignature_requiredpayment_requiredforbiddennot_foundconflictgonepayload_too_largeunprocessable_entitytoo_many_requestsinternal_errornot_implementedbilling_unavailablenot_contactablemailbox_link_unavailablemailbox_requiredmail_engine_unavailablewebhook_publisher_unavailabledatabase_unavailableclient_errormessagestring requiredHuman-readable explanation of the refusal.
statusinteger requiredThe HTTP status code, repeated in the body.
remedyobjectA self-serve path forward, when one exists (a 402 points at the credit top-up).
kindstring requiredWhat kind of remedy this is, so a client can route it: whether the caller can clear the condition through the API, or a person must act in the web app.
topupconnect_mailboxurlstring requiredWhere to go to clear the condition: an API path, or a web app page when only a person can.
401No or invalid credentialcodestring requiredStable machine-readable error code. Branch on this, never on the numeric status.
bad_requestunauthorizedsignature_requiredpayment_requiredforbiddennot_foundconflictgonepayload_too_largeunprocessable_entitytoo_many_requestsinternal_errornot_implementedbilling_unavailablenot_contactablemailbox_link_unavailablemailbox_requiredmail_engine_unavailablewebhook_publisher_unavailabledatabase_unavailableclient_errormessagestring requiredHuman-readable explanation of the refusal.
statusinteger requiredThe HTTP status code, repeated in the body.
remedyobjectA self-serve path forward, when one exists (a 402 points at the credit top-up).
kindstring requiredWhat kind of remedy this is, so a client can route it: whether the caller can clear the condition through the API, or a person must act in the web app.
topupconnect_mailboxurlstring requiredWhere to go to clear the condition: an API path, or a web app page when only a person can.