Suggest a subdomain for a project name
const url = 'https://api.deploybase.eu/api/v1/api/v1/projects/suggest-subdomain?name=example';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “ Query Parameters ”Project name
Responses
Section titled “ Responses ”OK
object
object
object
Category says why a reserved subdomain is reserved (hostname, mailbox, …).
Code is present when Available is false: a pkg/slug shape code, “reserved” or “taken”.
Reason is Code in words, for a form field.
Subdomain is the value checked: the one typed, or the server’s candidate for a name.
Suggestions are free alternatives, present when the subdomain is reserved or taken: {name}-{team slug} first, then numbered.
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
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Unauthorized
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Internal Server Error
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Live 174db30c built