Domains
GET
https://api.restorehub.net /api/v1/servers/{id}/domain Get the server's custom domain
Required scope: domains:read
Parameters
idstringpathrequiredCode samples
cURL
curl -X GET "https://api.restorehub.net/api/v1/servers/{id}/domain" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
Example
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}Schema
errorstringHuman-readable error message
codestringMachine-readable error code (optional)
detailsobjectValidation issues (optional)
requiredScopestringRequired scope (on 403 only)
yourScopesstring[]Your key's scopes (on 403 only)
PUT
https://api.restorehub.net /api/v1/servers/{id}/domain Update the custom domain
Required scope: domains:write
Parameters
idstringpathrequiredRequest body
application/json
hostnamestring{
"hostname": "string"
}Code samples
cURL
curl -X PUT "https://api.restorehub.net/api/v1/servers/{id}/domain" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"hostname":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}POST
https://api.restorehub.net /api/v1/servers/{id}/domain Add a custom domain
Required scope: domains:write
Parameters
idstringpathrequiredRequest body
application/json
hostnamestringrequired{
"hostname": "string"
}Code samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/servers/{id}/domain" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"hostname":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}DELETE
https://api.restorehub.net /api/v1/servers/{id}/domain Remove the custom domain
Required scope: domains:write
Parameters
idstringpathrequiredCode samples
cURL
curl -X DELETE "https://api.restorehub.net/api/v1/servers/{id}/domain" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}POST
https://api.restorehub.net /api/v1/servers/{id}/domain/verify Verify domain DNS + provision TLS
Required scope: domains:write
Parameters
idstringpathrequiredCode samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/servers/{id}/domain/verify" \
-H "Authorization: Bearer $RESTOREHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}Updated