Skip to main content
POST
string
required
The API key for your account. You can find this in your account settings.
Create Share makes a link (https://files.squarecloud.dev/s/...) to hand one file to people: a client, a team, a tester. It works for public and private files, lasts up to 30 days, can be revoked at any time and can limit how many times the file is downloaded. On Pro and Enterprise it can also ask for a password. Requires the blob:write scope. Opening the link downloads the file. A password-protected link first shows a page asking for the password, in the visitor’s language. The link is tied to the file’s current id: deleting, moving or changing the visibility of the file makes it answer 404 right away, without spending a download. See Links and sharing for how it compares to temporary links.
string
required
The id of the file to share.
number
default:"86400"
How long the link lasts, from 60 to 2592000 seconds (30 days).
number
How many downloads the link allows, from 1 to 10000. Once spent, it answers 410. Without it, there is no cap.
string
A password of 8 to 128 characters the visitor must type before downloading. Pro and Enterprise only.
For a public file the link redirects to its permanent public URL, which anyone who opens it can keep using. The password, the download cap and the expiry only truly protect private files.

Limits

  • 30 links per minute (RATE_LIMITED, 429), and up to 1000 active links per account (TOO_MANY_SHARES, 409).
  • Each link accepts 120 visits per minute per IP. Wrong passwords are limited per IP and per link.
  • Downloading a private file goes through a temporary link: 60 requests per minute per IP, plus the overall limit of your account. To hand a file to many people, make it public.

Response

Answers 201 Created.
string
“success” if successful, “error” if not.
object

Errors