Skip to content
RedirHub/API
Sign inGet API key
Hostnames · host.store
POST/hosthost.store

Create a hostname

POST /host is part of the Hostnames group. Its parameters and response shape below are generated from the live OpenAPI document.

Base URL
https://api.redirhub.com/v1
Auth
Bearer token
Idempotent
No
Returns
application/json

The request

Send a JSON body to POST /host. host is the only required field.

# Create a hostname
curl -X POST "https://api.redirhub.com/v1/host" \
  -H "Authorization: Bearer $REDIRHUB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "host": "go.acme.com",
    "https_requested": true,
    "short_links_enabled": true
  }'

Body parameters

FieldDescription
hostRequiredstringThe hostname to connect, e.g. go.example.com. Wildcards are not accepted here.
https_requestedoptionalbooleanWhether the platform should issue and renew an SSL certificate for this hostname and accept HTTPS traffic on it. Defaults to true for a hostname that is being connected for the first time, and leaves an already connected one untouched.
short_links_enabledoptionalbooleanWhether this hostname may be used to create new short links. QR codes are generated from short links, so this also controls QR code creation on this hostname. Existing links and QR codes continue to resolve when disabled.

The response

A 200 returns the record as JSON.

{
  "host": "go.acme.com",
  "domain": "string",
  "correct": true,
  "default_require": "ip",
  "require": [
    "string"
  ],
  "current": [
    {
      "type": "link",
      "value": "string",
      "line": "string"
    }
  ],
  "errors": [
    {
      "scope": "string",
      "message": "The given data was invalid.",
      "updated_at": "2026-08-01T09:14:22Z"
    }
  ],
  "counts": [
    "string"
  ],
  "https_requested": true,
  "short_links_enabled": true,
  "public": true,
  "notice": "string",
  "checked_at": "string",
  "created_at": "2026-08-01T09:14:22Z",
  "updated_at": "2026-08-01T09:14:22Z"
}

Status codes

200
SuccessThe hostname that is now connected to the workspace.
401
UnauthenticatedUnauthenticated
422
Validation failedA field was rejected. errors lists every field with its reason.
429
Too many requestsToo many requests
484
Bad requestThe workspace role of the authenticated user is too low for this action.