Subdomains

Manage and configure organization-specific subdomains for your docs.

Provide a branded subdomain for each organization to create a consistent user experience. This API supports subdomain creation, DNS checks, and more.

The Subdomain object

Attributes
objectstring · enumrequiredAvailable options:
subdomainstring · min: 3 · max: 32required

The GitBook subdomain, for example "my-company" in "my-company.gitbook.io"

Pattern: ^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$
targetone ofrequired

isActivebooleanrequired

The Subdomain object

{
  "object": "subdomain",
  "subdomain": "text",
  "target": {
    "type": "organization",
    "organization": "text"
  },
  "isActive": true
}

Get a subdomain

get
Authorizations
Path parameters
subdomainstring · min: 3 · max: 32required

The subdomain, for example "my-company" in "my-company.gitbook.io"

Pattern: ^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$
Responses
curl -L \
  --url 'https://api.gitbook.com/v1/subdomains/{subdomain}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "object": "subdomain",
  "subdomain": "text",
  "target": {
    "type": "organization",
    "organization": "text"
  },
  "isActive": true
}

Was this helpful?