Create a database snapshot
Back up a database’s data with POST /v2/databases//snapshots. Returns a download URL valid for 30 days, or 202 while it keeps generating.
POST
Create a database snapshot
string
required
The API key for your account. You can find this in your account settings.
snapshots:write scope.
Captures a point-in-time backup of the database’s data and uploads it to Square Cloud’s snapshot storage, returning a signed download URL valid for 30 days. Use it before a risky migration, a manual Restore Snapshot, or on a schedule for disaster recovery. Once created, snapshots also show up in List Snapshots.
Parameters
string
required
The ID of the database.
Soft deadline behavior
This route follows a soft deadline model: it no longer always responds synchronously.- If the snapshot finishes within ~90 seconds, the route responds with
200 successand a signed download URL (valid for 30 days), exactly as before. - If the snapshot takes longer than ~90 seconds to generate, the route responds immediately with
202and the codeSNAPSHOT_PROCESSING. This is not a failure. The snapshot keeps generating in the background and will appear in the snapshot listing on its own, typically within ~2 minutes. This is expected behavior for large databases.
Response
string
Indicates whether the call was successful:
success if it was, error if not.object
The contents of the response. Present only when
status is success.202
Returned when the snapshot exceeds the ~90 second soft deadline. The snapshot is still being generated in the background and will appear in the snapshot listing on its own, typically within ~2 minutes. Not an error: wait and confirm via the
GET listing endpoint.Errors
A snapshot request can be rejected with429 Too Many Requests. Use the code field to tell the two cases apart:
429
Short-term cooldown: you hit the per-user (1 request / 5s) or per-database (1 request / 180s) limit. Back off and retry shortly.
429
Daily quota reached: the account used up its plan’s daily snapshot allowance ((RAM / 256) × 2 per 24h). The quota frees up as the rolling 24-hour window advances; for a higher daily allowance, upgrade the plan.
Related
- CLI:
squarecloud db snapshot create - SDKs:
api.databases.snapshots.create()(JavaScript),client.databases.snapshots.create()(Python),c.Databases.Snapshots.Create()(Go)

