hosting

POST /v1/offsite-destinations

Add a place to send backups to, after proving we can write, read and delete there.

All hosting endpoints

All developer docs

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

NameTypeRequiredWhat it is
org_idstringNo
namestringYes
kindstring<s3, sftp>Yes
prefixstringNo
endpointstringNoS3: an https:// endpoint with no path.
regionstringNoS3: the bucket's region, or auto for Cloudflare R2.
bucketstringNo
access_key_idstringNo
secret_access_keystringNo
hoststringNoSFTP: the server's host name.
portintegerNo
usernamestringNo
passwordstringNo
private_keystringNoOpenSSH format.

Response

NameTypeRequiredWhat it is
idstringYes
org_idstringYes
namestringYes
kindstring<s3, sftp>Yes
endpointstringNo
regionstringNo
bucketstringNo
hoststringNo
portintegerNo
usernamestringNo
host_key_fingerprintstringNoThe pinned SFTP host key as SHA256:…, the form ssh-keygen -lf prints.
prefixstringYes
statusstring<working, failing>Yes
last_checked_atstringNo
last_check_codestringNo
sites_usingintegerYes
created_atstringYes

Errors this endpoint can return

401 · 403 · 404 · 422