Create redirect

Create a new URL redirect (301 permanent or 302 temporary). Can be configured for a specific path or wildcard for all sub-pages.

Path Parameters

accountId integer · min: 1 required Example

Unique account identifier

Headers

Accept Example
Content-Type Example

Body

required
application/json
domain string required
directory string required
redirectUrl string required
type string
wildcard boolean

Responses

200
success boolean
timestamp string
requestId string
data object
422
error string
message string
code string
timestamp string
requestId string
details array
POST https://cloud.hostup.se/api/hosting/{accountId}/redirects
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/hosting/17374/redirects" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "string",
    "directory": "string",
    "redirectUrl": "string",
    "type": "string",
    "wildcard": true
  }'
Response
{
  "success": true,
  "timestamp": "string",
  "requestId": "string",
  "data": {
    "success": true,
    "accountId": "string",
    "cpanelUsername": "string",
    "domain": "string",
    "directory": "string",
    "redirectUrl": "string",
    "type": "string",
    "wildcard": true,
    "created": true
  }
}
Request Body
{
  "domain": "string",
  "directory": "string",
  "redirectUrl": "string",
  "type": "string",
  "wildcard": true
}