Skip to main content
curl --request POST \
  --url 'https://blob.squarecloud.app/v1/objects?name=myfile&prefix=images&expire=30' \
  --header 'Authorization: YOUR_API_KEY' \
  --form 'file=@./myphone.png'
{
    "status": "success",
    "response": {
        "id": "3155597145698959364/test_lxch4k7y-07ee.png",
        "name": "test",
        "size": 416230,
        "url": "https://public-blob.squarecloud.dev/3155597145698959364/test_lxch4k7y-07ee.png"
    }
}
Authorization
string
required
The API key for your account. You can find this in your account settings.
file
file
required
Use FormData. (multipart/form-data)
name
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)
prefix
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)
expire
number
A number indicating the expiration period of the file, ranging from 1 to 365 days.
security_hash
boolean
Set to true if a security hash is required.
auto_download
boolean
Set to true if the file should be set for automatic download.

Rate limits & concurrency

Uploading requires a paid plan.
  • Hobby and Standard plans are limited to 1 upload per second.
  • Pro and Enterprise plans are not subject to the per-second limit — they can instead run up to 4 uploads at the same time.
Across every paid plan, an account may have at most 4 uploads in progress simultaneously. Starting another upload while 4 are still running returns TOO_MANY_CONCURRENT_UPLOADS (429).
For security, .html and .svg files are always delivered as downloads (served as application/octet-stream) instead of being rendered inline.

Response

status
string
Indicates whether the call was successful. “success” if successful, “error” if not.
response
object
curl --request POST \
  --url 'https://blob.squarecloud.app/v1/objects?name=myfile&prefix=images&expire=30' \
  --header 'Authorization: YOUR_API_KEY' \
  --form 'file=@./myphone.png'
{
    "status": "success",
    "response": {
        "id": "3155597145698959364/test_lxch4k7y-07ee.png",
        "name": "test",
        "size": 416230,
        "url": "https://public-blob.squarecloud.dev/3155597145698959364/test_lxch4k7y-07ee.png"
    }
}

Troubleshooting

// The provided object name is invalid.
// Must adhere to the a to z, A to Z, 0 to 9, and _ pattern.
{
    "status": "error",
    "code": "INVALID_OBJECT_NAME"
}
The current maximum file size is 100MB. In the future, we plan to increase it to 10GB. For now, the limit is 100MB due to technical and load-balancing constraints.
// The provided file is invalid.
{
    "status": "error",
    "code": "INVALID_FILE"
}