Create redirects for web hosting accounts

Set up redirects for your domain linked to your web hosting. This is useful when you want visitors to a specific page or directory to be automatically sent to another URL, such as your homepage or an updated page.

Web Hosting Services Hosting Accounts

Context

Where to get IDs / values

Path Parameters

accountId integer · min: 1 required Example: 20000

Unique account identifier

Headers

Accept Example
Content-Type Example

Body

required
application/json
description string · Example: Permanent redirect to home
directory string required · Example: /go-tt
domain string required · Example: example.com
redirectUrl string required · Example: https://example.com

Responses

200
data object required
data.accountId string required · Example: 20000
data.cpanelUsername string required · Example: xkqjm
data.created boolean required · Example: true
data.directory string required · Example: /go-tt
data.domain string required · Example: example.com
data.redirectUrl string required · Example: https://example.com
data.success boolean required · Example: true

True for successful responses.

data.type string required · Example: permanent
data.wildcard boolean required · Example: false
requestId string required · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba

Unique request identifier (UUID).

success boolean required · Example: true

True for successful responses.

timestamp string required · Example: 2026-02-10T00:00:00.000Z

ISO 8601 timestamp (UTC).

422
code string required · Example: VALIDATION_ERROR

Machine-readable error code.

details array<object> required · Example: [{"field":"domain","message":"domain is required","code":"REQUIRED"},{"field":"director...

Optional validation details (field-level errors).

details[].code string required · Example: REQUIRED

Machine-readable error code.

details[].field string · enum required · Example: domain
directory
domain
redirectUrl
details[].message string required · Example: domain is required

Human-readable message.

error string required · Example: Unprocessable Entity

HTTP status title (e.g. 'Bad Request').

message string required · Example: Validation failed

Human-readable message.

requestId string required · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba

Unique request identifier (UUID).

timestamp string required · Example: 2026-02-10T00:00:00.000Z

ISO 8601 timestamp (UTC).

POST https://cloud.hostup.se/api/hosting/{accountId}/redirects
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/hosting/20000/redirects" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "example.com",
    "directory": "/go-tt",
    "redirectUrl": "https://example.com",
    "description": "Permanent redirect to home"
  }'
Response
{
  "success": true,
  "timestamp": "2026-02-10T00:00:00.000Z",
  "requestId": "2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba",
  "data": {
    "success": true,
    "accountId": "20000",
    "cpanelUsername": "xkqjm",
    "domain": "example.com",
    "directory": "/go-tt",
    "redirectUrl": "https://example.com",
    "type": "permanent",
    "wildcard": false,
    "created": true
  }
}
Request Body Example 1
{
  "domain": "example.com",
  "directory": "/go-tt",
  "redirectUrl": "https://example.com",
  "description": "Permanent redirect to home"
}