Skip to main content
POST
Add a custom domain

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

sailbox_id
string
required

Id of the Sailbox, as returned by create. It is sb_ followed by a UUID.

Pattern: ^sb_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

Body

application/json
domain
string
required

Hostname you own, such as app.example.com. Give the bare name, with no scheme, port, or path. It needs at least two labels, and each label runs to at most 63 characters. Wildcards and IP addresses are refused.

Maximum string length: 253
Example:

"app.example.com"

guest_port
integer
required

Port inside the Sailbox to send this hostname's traffic to. The Sailbox has to publish it as an http listener already.

Required range: 1 <= x <= 65535
Example:

8000

Response

The hostname serves the port.

A hostname you own, serving one published http port.

domain
string
required

The hostname, lowercased. A name with non-ASCII characters comes back in its ASCII form.

Example:

"app.example.com"

sailbox_id
string
required

Sailbox the hostname serves.

guest_port
integer
required

Port inside the Sailbox that traffic to this hostname reaches.

Required range: 1 <= x <= 65535
url
string<uri>
required

The hostname's HTTPS address.

Example:

"https://app.example.com"

cname_target
string
required

Hostname to point your DNS at with a CNAME record. It is the same for every domain in your organization, so you can read it once and reuse it.

created_at
string<date-time>
required

When the hostname was registered.