Upload an asset
Uploads a file and creates an asset. An asset is a stored file that you can reference by ID elsewhere in the API.
For example, to attach a file to an invoice, upload it using this endpoint and
pass the returned id in attachmentAssetIds when calling Create an invoice
or Patch an invoice.
Sending the file
Send a multipart/form-data request containing one part named file.
The filename must use a supported extension, and the file part must have a
supported Content-Type. We derive the asset’s format and type from the file
part’s Content-Type, not from its filename extension.
The request must include a Content-Length header indicating the size of the
multipart request body, in bytes. It must not exceed 10 MiB (10,485,760 bytes).
Images
jpgorjpegwith aContent-Typeofimage/jpegpngwith aContent-Typeofimage/png
Image files may be re-encoded to remove metadata.
Documents
pdfwith aContent-Typeofapplication/pdf
Binary files
csvwith aContent-Typeoftext/csvtxtwith aContent-Typeoftext/plainmdwith aContent-Typeoftext/markdownrtfwith aContent-Typeofapplication/rtfdocwith aContent-Typeofapplication/msworddocxwith aContent-Typeofapplication/vnd.openxmlformats-officedocument.wordprocessingml.documentxlswith aContent-Typeofapplication/vnd.ms-excelxlsxwith aContent-Typeofapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheetxlsmwith aContent-Typeofapplication/vnd.ms-excel.sheet.macroEnabled.12odtwith aContent-Typeofapplication/vnd.oasis.opendocument.textodswith aContent-Typeofapplication/vnd.oasis.opendocument.spreadsheetzipwith aContent-Typeofapplication/zip
Headers
Your API credentials. Eg. Basic {credentials}.
Response
Created
Signed URL for downloading the file. The URL expires one week after it is generated. Call Get an asset when you need a new URL.
"https://assets.sequencehq.com/1986c663-9ee9-4811-bfbf-57d2ad666096/images/e007e884-5100-4183-8355-4771865cb4dd.png?token=grhc3VtaoNLAifDBFXWYLHcNnK3XJHzFjZ4iMf78Ozg&expires=604800"