Skip to content

Suggest a subdomain for a project name

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

Returns the production address the server derives from a project name, the same one POST /projects would use when no subdomain is sent, and whether it is free. A page prefills this, so what it shows is what a create reserves. Never empty: a very short or emoji-only name still gets one. When it is taken, suggestions carry free alternatives.

name
required
string

Project name

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 174db30c built