hosting

PUT /v1/sites/{siteId}/ftp-users/{ftpUserId}/allowed-addresses

Choose which addresses may log in to a site by SFTP.

All hosting endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The key must carry the sites.view permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/ftp-users/{ftpUserId}/allowed-addresses \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "addresses": <string[]> }'

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

Replaces the SFTP address allowlist: only these IP addresses or CIDR ranges may log in with the site's SFTP keys, every key included (a key added later inherits the list). The server enforces it before a session exists. An empty list allows any address. Entries come back in normal form (203.0.113.7, 203.0.113.0/24), duplicates dropped; the saved list is also allowed_from on listSiteFtpUsers. 422 for an entry that is not an IP address or range, for more than 20 entries, while SFTP is off, and on a plan whose SSH access carries SFTP. 404 for a site not on our own servers. Requires sites.view and sites.panel_access.

Parameters

NameTypeRequiredWhat it is
siteId (path)UuidYesSite ID (UUIDv7).
ftpUserId (path)stringYesThe account id returned by listSiteFtpUsers.

Request body

NameTypeRequiredWhat it is
addressesstring[]YesIP addresses or CIDR ranges (at most 20 after duplicates are dropped).

Response

NameTypeRequiredWhat it is
addressesstring[]YesIP addresses or CIDR ranges (at most 20 after duplicates are dropped).

Errors this endpoint can return

401 · 403 · 404 · 422 · 429 · 503