hosting
POST /v1/offsite-destinations
Add a place to send backups to, after proving we can write, read and delete there.
Authentication
Send an API key as a bearer token. The key must carry the hosting.backup.manage permission; a key without it is refused with 403, not 404.
Where your organisation id goes
This endpoint takes org_id as a field in the JSON body.
Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/offsite-destinations \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "kind": <string<s3, sftp>> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
The destination is saved only after a real round trip: a small test file is written, read back byte for byte and deleted. For SFTP the server's host key is read without authenticating and pinned; every later connection must present it. Addresses must be on the public internet and S3 endpoints must be https://. Credentials are write-only and go straight to our secret store with a fresh encryption key; every archive is encrypted (AES-256-CTR with HMAC-SHA256) before it leaves us. Refusals are 422 with a machine code in details[0].code. Requires hosting.backup.manage.
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
org_id | string | No | — |
name | string | Yes | — |
kind | string<s3, sftp> | Yes | — |
prefix | string | No | — |
endpoint | string | No | S3: an https:// endpoint with no path. |
region | string | No | S3: the bucket's region, or auto for Cloudflare R2. |
bucket | string | No | — |
access_key_id | string | No | — |
secret_access_key | string | No | — |
host | string | No | SFTP: the server's host name. |
port | integer | No | — |
username | string | No | — |
password | string | No | — |
private_key | string | No | OpenSSH format. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | string | Yes | — |
org_id | string | Yes | — |
name | string | Yes | — |
kind | string<s3, sftp> | Yes | — |
endpoint | string | No | — |
region | string | No | — |
bucket | string | No | — |
host | string | No | — |
port | integer | No | — |
username | string | No | — |
host_key_fingerprint | string | No | The pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints. |
prefix | string | Yes | — |
status | string<working, failing> | Yes | — |
last_checked_at | string | No | — |
last_check_code | string | No | — |
sites_using | integer | Yes | — |
created_at | string | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 422