Skip to content
Navigation

Add a booking-site hostname

POST
https://api.nicer.travel/identity/booking-site/hosts

Adds a Nicer subdomain or a custom domain to the agency's booking site, or to an advisor's site when the agency allows advisor pages. A custom domain may instead open the agency's portal or Pay (app), which only its admins add. A custom domain starts in PENDING_DNS with the CNAME target to create. Admins add any hostname for the agency; an advisor adds one only for their own page, while the agency allows advisor pages.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Header parameters

  • x-nicer-company
    string
    required

    Company context. Authentication and tenant membership are validated by the API.

Request body JSON required

One of the following:

  • object
    • handle
      string
      required
      pattern: ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])$
    • kind
      string
      required
    • advisorUserId
      optional
      string
      minLength: 1
  • object
    • host
      string
      required
      maxLength: 253 · pattern: ^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.){2,}[a-z]{2,63}$
    • kind
      string
      required
    • advisorUserId
      optional
      string
      minLength: 1
    • app
      optional
      BOOKING
      or
      PORTAL
      or
      PAY
    • preserveTraffic
      optional
      boolean

Returns

200

OK

JSON
  • canonical
    boolean
    required
  • companyName
    string
    required
    minLength: 1
  • createdAt
    string
    required
  • createdBy
    string
    required
    minLength: 1
  • kind
    SUBDOMAIN
    or
    CUSTOM
    or
    ALIAS
    required
  • status
    PENDING_DNS
    or
    ISSUING
    or
    ACTIVE
    or
    FAILED_DNS
    or
    FAILED_CERT
    or
    REMOVING
    required
  • updatedAt
    string
    required
  • host
    string
    required
    minLength: 1
  • certificateIssued
    boolean
    required
  • hasTenant
    boolean
    required
  • advisorUserId
    optional
    string
    minLength: 1
  • aliasOf
    optional
    string
  • app
    optional
    BOOKING
    or
    PORTAL
    or
    PAY
  • attempt
    optional
    integer
    maximum: 9007199254740991 · minimum: 0
  • dnsTarget
    optional
    string
  • lastError
    optional
    string
  • validationMode
    optional
    cloudfront
    or
    self-hosted
  • validationRedirectFrom
    optional
    string
  • validationRedirectTo
    optional
    string

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close