Rename a web hosting account
PATCH /api/v2/shared-hosting/{accountId}
Set or remove your own name for a web hosting account. The name helps you tell accounts apart in the client area and in the account list. It does not change the domain or anything on the server. Send customName: null or an empty string to remove it. customName is the only field accepted.
Authentication: An API key with the scope write:hosting. About keys and scopes
Request
Path parameters
accountIdstringrequiredThe web hosting account ID (
acct_…).Body
customNamestring or nullrequiredThe new name, up to 255 characters. Letters, digits, spaces, dashes, underscores and dots. Null or an empty string removes the name.
Example
curl -X PATCH "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "customName": "Production website" }'curl -X PATCH "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "customName": null }'Responses
200 The saved name.
{ "id": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3", "customName": "Production website"}Response fields
idstringThe web hosting account ID.
customNamestring or nullThe saved name. Null when it was removed.
Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is shared_hosting_not_found. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |