Delete a domain - Spacefast Docs
Delete a domain
Deletes the domain together with its zone, records, and registration history. Fails while the domain is assigned to a Space, while a registration or transfer is active, while a DNS operation is queued or running, or while a connected provider zone is attached.
DELETE /v1/domains/{domainId}
Authorization
Authorization Bearer token · header required
`Authorization: Bearer
or
Authorization Bearer token · header required
`Authorization: Bearer
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:write
Path parameters
domainId string required
Responses
204 The domain and its DNS data are deleted.
Try it
Server
Base URL https://api.spacefast.com Custom base URL Overrides the selected server when set.
Authorization
Bearer token Remember on this device Include my values in samples
Parameters
domainId path *
Request examples
cURL
curl -X DELETE "https://api.spacefast.com/v1/domains/string" \
-H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch("https://api.spacefast.com/v1/domains/string", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});
Python
import requests
response = requests.delete(
"https://api.spacefast.com/v1/domains/string",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)
Response
204
The domain and its DNS data are deleted.