compute
POST /v1/compute/servers/{serverId}/ddos-protection
Switch a server's DDoS protection add-on on or off.
Authentication
Send an API key as a bearer token. The key must carry the billing.payment.manage 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 POST https://api.zinndigital.com/v1/compute/servers/{serverId}/ddos-protection \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "enabled": <boolean> }'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
⛔ Chargeable: on adds the price the GET shows to what the server is billed (its hourly rate on a pay-by-the-hour server, its subscription from the next renewal otherwise); off takes exactly that off. The response is re-read from the provider. 422 when the account is on hold; 503 refusal.compute.ddosNotInLocation where the location does not offer it. A refusal changes nothing and charges nothing. Requires billing.payment.manage.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
serverId (path) | Uuid | Yes | The server's id, as listComputeServers reports it. Ours (UUIDv7), minted when the order row was written — never the provider's own identifier for the machine. |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
enabled | boolean | Yes | Whether automatic backups should run. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
available | boolean | Yes | — |
enabled | boolean | Yes | — |
price_minor | object | Yes | Monthly price while on, minor units of currency; null when not offered. |
currency | string | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 422 · 429 · 503