Skip to content

Check subdomain availability

GET
/api/v1/projects/check-subdomain
curl --request GET \
--url 'https://api.deploybase.eu/api/v1/api/v1/projects/check-subdomain?subdomain=example' \
--header 'Authorization: <Authorization>'

Checks whether a subdomain is free for a new project’s production address ({subdomain}.sites.deploybase.eu). Advisory: the create re-checks, and the unique index decides a race. When it is not available, code says why (a shape code such as too_short, or reserved, or taken) and a reserved or taken one carries suggestions: {name}-{team slug} first, then numbered.

subdomain
required
string

Subdomain to check

OK

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
available
boolean
category

Category says why a reserved subdomain is reserved (hostname, mailbox, …).

string
code

Code is present when Available is false: a pkg/slug shape code, “reserved” or “taken”.

string
reason

Reason is Code in words, for a form field.

string
subdomain

Subdomain is the value checked: the one typed, or the server’s candidate for a name.

string
suggestions

Suggestions are free alternatives, present when the subdomain is reserved or taken: {name}-{team slug} first, then numbered.

Array<string>

Example generated

{
"data": {
"available": true,
"category": "example",
"code": "example",
"reason": "example",
"subdomain": "example",
"suggestions": [
"example"
]
},
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Bad Request

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Unauthorized

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Internal Server Error

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Live a8b7eb1d built