Delete domain

Request Information
URL DELETE {{basepath}}/hosting/:hosting_id/domains/:domain
CategoryHosting

Description

Allows you to immediately delete a hosting,

the request body should contain a HostingCancelRequest object.

Returns a HostingGetResponse object.

Url variables
:hosting_id{{hosting_id}}The hosting identifier
:domainsub2.example-2022-4-26-13-50-36.com

Example responses

Delete a subdomain
Request Method & URL
DELETE {{basepath}}/hosting/:hosting_id/domains/:domain
Url variables
:hosting_id{{hosting_id}}The hosting identifier
:domainsub2.example-2022-4-26-13-50-36.com
Response Code:
200 OK
Response Body:
{
    "responseId": "1_c9bfc5704c8b819f7c2d4ce917c1b1ade3e9ac1f",
    "status": "pending",
    "message": "The changes are pending",
    "domains": [
        {
            "name": "example-2022-4-26-13-50-36.com",
            "forward": false,
            "primary": true
        },
        {
            "name": "sub2.example-2022-4-26-13-50-36.com",
            "forward": false,
            "primary": false,
            "subDomainOf": "example-2022-4-26-13-50-36.com"
        }
    ]
}
Delete an alias
Request Method & URL
DELETE {{basepath}}/hosting/:hosting_id/domains/:domain
Url variables
:hosting_id{{hosting_id}}The hosting identifier
:domainjohntest2023-05-15-999.nl
Response Code:
200 OK
Response Body:
{
    "responseId": "1_c9bfc5704c8b819f7c2d4ce917c1b1ade3e9ac1f",
    "status": "pending",
    "message": "The changes are pending",
    "domains": [
        {
            "name": "example-2022-4-26-13-50-36.com",
            "forward": false,
            "primary": true
        },
        {
            "name": "sub2.example-2022-4-26-13-50-36.com",
            "forward": false,
            "primary": false,
            "subDomainOf": "example-2022-4-26-13-50-36.com"
        }
    ]
}
Delete domain that does not exist
Request Method & URL
DELETE {{basepath}}/hosting/:hosting_id/domains/:domain
Url variables
:hosting_id{{hosting_id}}The hosting identifier
:domainexample-2022-4-26-13-50-36-extra.com
Response Code:
409 Conflict
Response Body:
{
    "responseId": "1_7cfa57d0c15a54620cf8a74d54f93003b3413097",
    "status": "error",
    "errorCode": "conflict",
    "errorMessage": "Domain does not exist in hosting"
}
Delete domain that is the primary domain
Request Method & URL
DELETE {{basepath}}/hosting/:hosting_id/domains/:domain
Url variables
:hosting_id{{hosting_id}}The hosting identifier
:domainexample-2022-4-26-13-50-36.com
Response Code:
409 Conflict
Response Body:
{
    "responseId": "1_722603ca005626bd4f07a7fc8d8eb4e14e6d8aac",
    "status": "error",
    "errorCode": "conflict",
    "errorMessage": "You cannot delete the hosting's primary domain"
}