Endpoint
GET/domains/available
This API method retrieves a list of domains available for your team.
Authorization required.
If called without authorization, the request will not return an error but will only include the default public domain.
| Parameter | Description |
|---|---|
| search | case insensitive string anywhere in a domain name (own or public) |
curl https://state.sk/api/domains/available \
-H 'x-api-key: state_xxxxxxxxxx'
The response can include several categories of domains in the following order:
Service domains are marked as (owner = 'state')
Every custom domain must be verified before it can be used.
{
"items":[
{
"id": 9,
"org_id": "xxxxx",
"name": "domain.com",
"slug_length": 6,
"verified": true,
"allow_preview": true,
"owner": null
},
{
"id": 2,
"org_id": "xxxxx",
"name": "xxxxx.state.sk",
"slug_length": 6,
"verified": true,
"allow_preview": false,
"owner": "state"
},
{
"id": 1,
"org_id": "",
"name": "state.sk",
"slug_length": 6,
"verified": true,
"allow_preview": false,
"owner": "state"
}
],
"total": 3,
"offset": 0,
"limit": 3
}