Upload file

Upload a file for use as a listing deliverable. Returns a file token valid for 24 hours. Pass the token to PUT /v1/listings/{listing_id}/deliverables or POST /v1/orders/{id}/fulfill to attach the file. Max size: 25 MB. Accepted types: PDF, EPUB, ZIP, images, audio, video, Office documents.

Authentication

AuthorizationBearer

API key (lb_ prefix). Pass as: Authorization: Bearer lb_...

Request

This endpoint expects a multipart form containing a file.
filefileRequired
The file to upload

Response

File uploaded. Token valid for 24 hours.
idstring

File token. Pass as ‘token’ to set_deliverables, or as ‘cover’/‘avatar’ to create/update listing/account.

filenamestring
Original filename
sizeinteger
File size in bytes
mime_typestring
MIME type
purposestring

File purpose: ‘deliverable’ (listing content), ‘cover’ (listing cover image), or ‘avatar’ (account avatar).

expires_atdatetime
Token expires at this time. Upload a new file after expiry.
created_atdatetime
Time at which the file was uploaded
object"file"

Object type identifier. Always file.

Errors

401
Unauthorized Error
413
Content Too Large Error
422
Unprocessable Entity Error
429
Too Many Requests Error