Skip to content
RedirHub/API
Sign inGet API key
Hostnames · host.update
PUT/host/{host}host.update

Update a hostname

Update the configuration of a connected hostname.

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

The request

Send a JSON body to PUT /host/{host}. Every field is optional — send only what you want to set. The host path segment identifies the record.

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

Path parameters

ParameterDescription
hostRequiredstring

Body parameters

FieldDescription
https_requestedoptionalbooleanWhether the platform should issue and renew an SSL certificate for this hostname and accept HTTPS traffic on it.
force_httpsoptionalbooleanWhether visitors opening this hostname over HTTP are sent to HTTPS once its certificate is issued. Turning it on needs an Enterprise plan; turning it off is always allowed.
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.
connection_modeoptionalstringHow a hostname reaches RedirHub. managed: its DNS points to us and the edge serves it once its DNS check passes (NS, CNAME or TXT). integration: its DNS stays where it is; the customer's own CDN, app or CMS downloads the rules and redirects, and the first answer of its check path with the workspace's check token proves the workspace owns it (IntegrationHealth::checkMany(), HostOwnership::activateIntegration()). Both are probed by the same hostname check (system:dns-check, BulkVerifyDns), on the same schedule. The edge never serves an integration's links (EdgeRecordQuery). Both proofs end in active and dns_correct, so the mode never decides who a hostname belongs to. An integration has no grace period; one switched back to managed gets the grace period of a newly added hostname where no other workspace holds it (HostOwnership::switchConnectionMode()). managedintegration
report_404optionalbooleanFor an integration: whether it also reports the 404 pages your site answered, so you see the URLs it cannot find. On by default; the integration picks a change up with its next rules download (report404 on its @host line in the rules file).

The response

A 200 returns the record as JSON.

{
  "host": "go.acme.com",
  "domain": "string",
  "correct": true,
  "connection_mode": "string",
  "status": "sync_stopped",
  "integration": "string",
  "default_require": "ip",
  "require": [
    "string"
  ],
  "current": [
    "string"
  ],
  "errors": [
    {
      "scope": "string",
      "code": "string",
      "message": "The given data was invalid.",
      "updated_at": "2026-08-01T09:14:22Z"
    }
  ],
  "counts": [
    "string"
  ],
  "https_requested": true,
  "force_https": true,
  "ssl_renews_at": "string",
  "ssl_issued_at": "string",
  "connected_via": "string",
  "connected_at": "string",
  "dns_verified_at": "string",
  "created_by": {
    "id": "9f2a7c31-4b8e-4a02-9d1f-0c6b7e5a1d44",
    "name": "Acme"
  },
  "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 updated hostname.
401
UnauthenticatedUnauthenticated
422
Validation failedA field was rejected. errors lists every field with its reason.
429
Too many requestsToo many requests

What usually comes next

One call is rarely the whole job. These are the endpoints most integrations reach for around this one.