Check subdomain availability
const url = 'https://api.deploybase.eu/api/v1/api/v1/projects/check-subdomain?subdomain=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/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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “ Query Parameters ”Subdomain to check
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 a8b7eb1d built