Skip to content

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

accountIdstringrequired
The web hosting account ID (acct_…).

Body

customNamestring or nullrequired
The new name, up to 255 characters. Letters, digits, spaces, dashes, underscores and dots. Null or an empty string removes the name.

Example

PATCH /api/v2/shared-hosting/{accountId}
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"
}'

Responses

200 The saved name.

Response 200
{
"id": "acct_01hxa3b4c5d6e7f8g9h0j1k2m3",
"customName": "Production website"
}
Response fields
idstring
The web hosting account ID.
customNamestring or null
The saved name. Null when it was removed.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller; code is shared_hosting_not_found.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.