Skip to main content

Choose your SDK

All SDKs are open source and available on GitHub. They have zero runtime dependencies and return the API’s own data, field names included.

JavaScript

@squarecloud/api v6. Apps, databases, workspaces, deploys, network, realtime, snapshots and AI, on Node.js, Deno, Bun and edge runtimes.

Python

squarecloud-api v5. The same coverage, with a sync and an async client, using only the standard library.

Go

sdk-api-go v3. The same coverage, with context on every call and one error type.

Blob Storage (JavaScript)

@squarecloud/blob v4. Uploads up to 10 GiB, private objects, links, shares, rules and the S3 gateway, on Node.js and in the browser.

At a glance

Quickstart

Make your first call in a few minutes. Each program below prints your account name and how many apps your API key can see.
1

Create an API key

Create a key in your account security settings. Treat it like a password: keep it out of your source code.
2

Set the SQUARECLOUD_API_KEY environment variable

The examples read the key from SQUARECLOUD_API_KEY. Set it in the terminal where you run them:
3

Install the SDK and make your first call

index.mjs
4

Check the output

The program prints your account name and the number of apps the key can see:
A 401 ACCESS_DENIED error means the key is wrong, revoked or expired. If the variable is not set, the program stops before sending anything.

What each SDK covers

The JavaScript, Python and Go SDKs cover the whole Square Cloud API: the same 67 operations, plus downloading snapshot files. They share the same page structure, the same examples and the same behavior:
  • one error class, with the HTTP status and the API’s error code;
  • a 30-second timeout, and at least 120 seconds for calls the server holds open;
  • retries only for failures that are safe to repeat, never for a 429;
  • <appId>-<workspaceId> ids to act on apps shared through a workspace.
The Blob Storage SDK covers the Blob API and the S3 gateway. It is a separate package with its own client, credentials and error codes.

Error references

Each SDK page on errors covers its error class, retries and rate limits. The error codes themselves come from the API: the API error reference lists every one, and the Blob API errors reference lists the Blob Storage codes.

Upgrading

Every API SDK release above is a rewrite. See the migration guides: JavaScript v5 → v6, Python v4 → v5, Go v2 → v3 and Blob v3 → v4. Square Cloud keeps improving its SDKs and adding new languages. If yours is missing, let us know.

Next steps

API introduction

Call the REST API directly, with curl.

CLI quickstart

Deploy and manage apps from the terminal.

Blob API quickstart

Upload a file to Blob Storage with curl.