Is a portal address free?
GET
/api/v1/sites/address
const url = 'http://localhost:3000/api/v1/sites/address';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3000/api/v1/sites/address \ --header 'Authorization: Bearer <token>'Whether a portal may take this address, why not (taken, or kept for the service), and the URL it would answer at.
Scope: write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”slug
string
The address, e.g. press-kit
portal
string
The portal being renamed, by id: its own address counts as free
subdomain
string
0 for a portal on a domain of its own, or a members one: it never answers at a subdomain, so the names kept for the service are free to it
Responses
Section titled “Responses”The address
Media typeapplication/json
object
data
required
object
slug
required
string
available
required
boolean
reason
required
Why not: taken, or kept for the service
string | null
url
required
Where a public portal at it answers: {slug}.PORTAL_DOMAIN when the server has one, else /p/{slug}
string format: uri
Examplegenerated
{ "data": { "slug": "example", "available": true, "reason": "example", "url": "https://example.com" }}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}