Skip to main content
string
required
The API key for your account. You can find this in your account settings.
Object Post uploads a single file to Square Cloud Blob Storage and returns a CDN-backed URL you can embed or share directly, without provisioning a bucket or managing ACLs yourself. It backs attachments, generated exports, and user-uploaded media for applications hosted on the platform. The stored extension comes from the filename you send in the multipart part (falling back to the declared MIME type, then to bin), so always send a real filename. Practically any file type is accepted; only executables and installers are refused. Objects can be given an automatic expiration between 7 and 1825 days (5 years), after which they’re no longer served. A single request accepts files from 512 bytes up to 100 MB, the largest body Cloudflare’s edge accepts. Larger files, up to 1 GiB, go through the chunked upload flow. Once a file is uploaded, browse it with Object List, remove it with Object Delete, or track usage against your plan’s quota with Account Stats.
file
required
Use FormData (multipart/form-data). Exactly one file per request.
Send a real filename: the stored extension is derived from it.
string
required
A string representing the name of the file. (without extension)
Must adhere to the a to z, A to Z, 0 to 9, and _ pattern. (3 to 32 characters)
string
A string representing the prefix for the file.
Must adhere to the a to z, A to Z, 0 to 9, and _ pattern. (3 to 32 characters)
number
A number indicating the expiration period of the file, ranging from 7 to 1825 days (5 years).
boolean
Set to true if a security hash is required.
boolean
Set to true if the file should be set for automatic download.

Rate limits & concurrency

Uploading requires a paid plan.
  • Every account may have at most 4 uploads in progress simultaneously. Starting another upload while 4 are still running returns TOO_MANY_CONCURRENT_UPLOADS (429).
  • Hobby and Standard plans are additionally limited to 1 upload per second (RATE_LIMITED, 429). Pro and Enterprise plans are exempt from the per-second limit.
For security, formats a browser renders inline (.html, .svg, .xml, .xhtml and similar) are always delivered as downloads (served as application/octet-stream) instead of being rendered. Setting auto_download=true applies the same forced-download behavior to any file type.

File types

Practically any extension is accepted, including formats with no registered MIME type (.bam, .vcf, .fasta, .fastq, .parquet, .h5, .npy and so on). There is no MIME allowlist anymore.
  • The stored extension is derived from the filename sent in the multipart part, falling back to the declared MIME type, then to bin.
  • Compound compression suffixes are preserved: reads.fastq.gz is stored as .fastq.gz, not .gz.
  • The served Content-Type is derived server-side from the extension. Unknown formats are served as application/octet-stream, so they download instead of rendering.
  • Executables and installers are refused with BLOCKED_FILE_TYPE: exe, msi, dll, bat, cmd, com, scr, cpl, pif, hta, vbs, vbe, jse, wsf, wsh, msc, reg, lnk, sys, drv, ps1, apk, xpi.

Response

string
Indicates whether the call was successful. “success” if successful, “error” if not.
object

Troubleshooting

A single request accepts up to 100 MB. For files up to 1 GiB, use the chunked upload flow.