---
title: "A 15-minute download link (presigned URL) for one backup, after checking the dump is complete. Needs databases:reveal (owner/admin, or a developer on the database's project); audited. 409 with details.reason for missing, empty, incomplete or damaged dumps; 409 with details.verifying and Retry-After while a large dump is still being checked"
method: POST
path: "/databases/{databaseId}/backups/download"
tags: ["Databases"]
---

# A 15-minute download link (presigned URL) for one backup, after checking the dump is complete. Needs databases:reveal (owner/admin, or a developer on the database's project); audited. 409 with details.reason for missing, empty, incomplete or damaged dumps; 409 with details.verifying and Retry-After while a large dump is still being checked

`POST /databases/{databaseId}/backups/download`

## Request

- Base URL: `https://hostingsurge.com/api/v1`
- URL: `https://hostingsurge.com/api/v1/databases/{databaseId}/backups/download`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-hs_session`

## Path parameters

- `databaseId` string, uuid, required

## Request body

- object
  - `executionId` string, required: id of a backup from GET /databases/{id}/backups/executions

## Response `200`

Download link

- object
  - `executionId` string, required
  - `url` string, required: Presigned HTTPS GET URL of the backup file; no credentials needed, do not share it
  - `expiresAt` string, required: The URL works until then (start the download before)
  - `downloadName` string, required: File name the browser saves it as
  - `sizeBytes` integer, required
  - `format` 'postgresql' | 'sql' | 'mongodb', required
  - `contentType` string, required
  - `check` object, required: completeness check of the file (complete, or unknown when it could not be checked)
    - `state` 'complete' | 'empty' | 'truncated' | 'invalid' | 'unknown', required
    - `tables` integer, nullable, required: tables in the dump, when counted
  - `restoreHint` string, required: how to restore the file by hand

## Other responses

- `400`: Invalid request (code invalid_request)
- `401`: Missing or invalid session/token (code unauthorized)
- `403`: Authenticated but not permitted (code forbidden)
- `404`: Not found or not visible to the caller (code not_found)
- `409`: Conflicting state (code conflict)
- `429`: Too many requests (code rate_limited); see Retry-After
- `501`: Backup storage not configured (code not_configured)
- `503`: Hosting engine unavailable (code provider_unavailable)

---

[API](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api.md) · [All operations](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostingsurge/apis/hostingsurge-platform-api/revisions/4d08337cdff1?raw)
