Chief Tools Logo
Domain Chief API v1

Endpoints for managing web redirects.


List web redirects

GET
https://domain.chief.app/api/v1
/domains/{domainNameOrId}/redirects/web
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

List all web redirects for the domain.

You can only manage web redirects for domains that use hosted DNS.

List web redirects › path Parameters

domainNameOrId
​string · required

full domain name or ID

List web redirects › query Parameters

sort
​string[] · maxItems: 5 · style: form

Sort by up to five fields, separated by commas. Prefix a field with - for descending order.

Enum values:
subdomain
-subdomain
id
-id
Default: ["id"]
page
​integer · min: 1
Default: 1
per_page
​integer · min: 1 · max: 100
Default: 50

List web redirects › Responses

Paginated set of WebRedirect

​WebRedirect[] · required
​object · required
​object · required

Create web redirect

POST
https://domain.chief.app/api/v1
/domains/{domainNameOrId}/redirects/web
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Create a single web redirect for the domain.

You can only manage web redirects for domains that use hosted DNS.

A redirect without a subdomain redirects the root domain and, unless include_www is false, the www subdomain too. Use the www subdomain to redirect only www, for example to the root domain.

This endpoint will remove any conflicting DNS records if needed to ensure the redirect works correctly.

Create web redirect › path Parameters

domainNameOrId
​string · required

full domain name or ID

Create web redirect › Request Body

target
​string · uri · required
status_code
​integer · enum · required
Enum values:
301
302
307
308
subdomain
​string | null · maxLength: 255
include_www
​boolean

Whether a redirect without a subdomain also redirects the www subdomain. Ignored when a subdomain is given.

include_path
​boolean
include_query
​boolean

Create web redirect › Responses

WebRedirect

​WebRedirect · required

Show web redirect

GET
https://domain.chief.app/api/v1
/domains/{domainNameOrId}/redirects/web/{webRedirectId}
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Show a single web redirect for the domain.

You can only manage web redirects for domains that use hosted DNS.

Show web redirect › path Parameters

domainNameOrId
​string · required

full domain name or ID

webRedirectId
​string · required

Show web redirect › Responses

WebRedirect

​WebRedirect · required

Update web redirect

PUT
https://domain.chief.app/api/v1
/domains/{domainNameOrId}/redirects/web/{webRedirectId}
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Update a single web redirect for the domain.

You can only manage web redirects for domains that use hosted DNS.

The subdomain of a redirect cannot be changed. For a redirect without a subdomain, include_www controls whether the www subdomain is redirected too.

This endpoint will remove any conflicting DNS records if needed to ensure the redirect works correctly.

Update web redirect › path Parameters

domainNameOrId
​string · required

full domain name or ID

webRedirectId
​string · required

Update web redirect › Request Body

target
​string · uri · required
status_code
​integer · enum · required
Enum values:
301
302
307
308
include_www
​boolean

Whether a redirect without a subdomain also redirects the www subdomain. Ignored for subdomain redirects.

include_path
​boolean
include_query
​boolean

Update web redirect › Responses

WebRedirect

​WebRedirect · required

Delete web redirect

DELETE
https://domain.chief.app/api/v1
/domains/{domainNameOrId}/redirects/web/{webRedirectId}
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Deletes a single web redirect for the domain.

You can only manage web redirects for domains that use hosted DNS.

Delete web redirect › path Parameters

domainNameOrId
​string · required

full domain name or ID

webRedirectId
​string · required

Delete web redirect › Responses

No content

No data returned