List managed hostnames - Spacefast Docs
List managed hostnames
Returns the read-only hostnames Spacefast manages for the caller’s Spaces, default hostname first and then alphabetically, with no pagination. Pass teamId to limit the result to one team. Custom domains live on /v1/domains.
GET /v1/managed-domains
Authorization
Authorization Bearer token · header required
Authorization: Bearer <token> with an API key (sfa_ prefix), an OAuth access token, a session token, or a Space machine credential (sfm_ prefix).
or
Authorization OAuth2 access token · header required
OAuth 2.0 with Spacefast scopes. People use the authorization code flow; machines use client credentials.
Scopes: domains:read
Query parameters
teamIdstring
min length 1
Responses
200 Response for status 200
$schemastring
Canonical JSON Schema URL for this response body. The server also sends it in theLink: rel="describedby"response header.dataobject[] required
Array ofobjectidstring required
Managed hostname row ID (phn_prefix).sourcestring required
A hostname Spacefast issued and manages; it cannot be edited or unassigned.managedboolean requireddeletableboolean requiredassignableboolean requiredprimaryboolean required
Whether the Space still serves its primary URL on this hostname. False once a custom domain takes over, and false on every row of the managed hostname list.namestring required
Full hostname Spacefast serves the Space on.unicodeNamestringkindstring requiredpublicNamestring required
Leftmost label ofname, chosen per Space.verificationobject requiredstatusstring requiredrequiredRecordsobject[]
Records the caller still has to create to prove control and route traffic. Absent once the hostname serves, and while the domain serves no Space.
Allowed:
A,AAAA,CNAME,TXT,ALIAS-namestring required
Record name, relative to the zone. -valuestring required
Exact value to set on the record. -ttlinteger
min -9007199254740991 · max 9007199254740991 -purposestring required
Why the record is needed:verificationproves ownership,routingsends traffic to the Space,sslallows certificate issuance.Allowed:
verification,routing,ssl-lastCheckedAtstring| any
ISO 8601 timestamp of the last DNS check. Null before the first one. -lastVerifiedAtstring| any
ISO 8601 timestamp when this domain last proved DNS control. Null if it never has.diagnosticsobject[]
Stable-coded observations about verification, delegation, and registration state. Absent when there are none.
codestring required
-severitystring required
Allowed:info,warning,error-messagestring required
-pathstring | any -providerstring | any
-detailsobject | any -fixstring | any
-retryableboolean | anycreatedAtstringrequired updatedAtstringrequired spaceIdstring required
Space served by this hostname (spc_prefix).spaceSlugstring required
Current slug of that Space.spaceTitlestring required
Current title of that Space.
default Error
Every 4xx and 5xx response is one RFC 9457 problem document served as application/problem+json.
$schemastringtypestring requiredtitlestring requiredstatusinteger required
min -9007199254740991 · max 9007199254740991detailstring requiredcodestring requiredpointerstringdetailsobjectsuggestionsstring[]nextstring[]requestIdstring required
Try it
cURL
curl -X GET "https://api.spacefast.com/v1/managed-domains" \
-H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch("https://api.spacefast.com/v1/managed-domains", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});
Python
import requests
response = requests.get(
"https://api.spacefast.com/v1/managed-domains",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)
Response
200 default
{
"$schema": "http://example.com",
"data": [
{
"id": "string",
"source": "managed_view_fast",
"managed": true,
"deletable": false,
"assignable": false,
"primary": true,
"name": "string",
"unicodeName": "string",
"kind": "hostname",
"publicName": "string",
"verification": {
"status": "not_required",
"requiredRecords": [
{
"type": "A",
"name": "string",
"value": "string",
"ttl": -9007199254740991,
"purpose": "verification"
}
],
"lastCheckedAt": "2019-08-24T14:15:22Z",
"lastVerifiedAt": "2019-08-24T14:15:22Z",
"diagnostics": [
{
"code": "string",
"severity": "info",
"message": "string",
"path": "string",
"provider": "infra",
"details": {
"property1": null,
"property2": null
},
"fix": "string",
"retryable": true
}
]
},
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"spaceId": "string",
"spaceSlug": "string",
"spaceTitle": "string"
}
]
}
{
"$schema": "http://example.com",
"type": "string",
"title": "string",
"status": -9007199254740991,
"detail": "string",
"code": "string",
"pointer": "string",
"details": {
"property1": null,
"property2": null
},
"suggestions": [
"string"
],
"next": [
"string"
],
"requestId": "string"
}