Update domains hosting type to/from forward

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

Description

Allows you to update hosting options

the request body should contain a HostingOptionsUpdateRequest object.

Returns a HostingOptionsResponse object.

Url variables
:hosting_id{{hosting_id}}The hosting identifier
JSON
{
    "domains": [
        {
            "name": "sub.example-2022-4-26-13-50-36.com"
        }
    ]
}

Example responses

Create a new forward domain
Request Method & URL
PATCH {{basepath}}/hosting/:hosting_id/domains
Request Body:
{
    "domains": [
        {
            "name": "example-2022-4-21-10-32-30-extra33.com",
            "forward": true,
            "forwardUrl": "https:\/\/www.metaregistrar.com",
            "forwardType": "302"
        }
    ]
}
Url variables
:hosting_id{{hosting_id}}The hosting identifier
Response Code:
201 Created
Response Body:
{
    "responseId": "1_3e1ddd7bcc3a9fb253b6e2571b9b88403efd7a5a",
    "status": "pending",
    "message": "The changes are pending",
    "domains": [
        {
            "name": "example-2022-4-26-13-50-36.com",
            "forward": false,
            "primary": true
        }
    ]
}
Update domain to hosting
Request Method & URL
PATCH {{basepath}}/hosting/:hosting_id/domains
Request Body:
{
    "domains": [
        {
            "name": "example-2022-4-21-10-32-30-extra33.com",
            "forward": false
        }
    ]
}
Url variables
:hosting_id{{hosting_id}}The hosting identifier
Response Code:
201 Created
Response Body:
{
    "responseId": "1_28c9df1019dbf9b6c04b35a39ee4e13f48af0970",
    "status": "pending",
    "message": "The changes are pending",
    "domains": [
        {
            "name": "example-2022-4-26-13-50-36.com",
            "forward": false,
            "primary": true
        },
        {
            "name": "example-2022-4-21-10-32-30-extra33.com",
            "forward": true,
            "primary": false
        }
    ]
}
Add a subdomain
Request Method & URL
PATCH {{basepath}}/hosting/:hosting_id/domains
Request Body:
{
    "domains": [
        {
            "name": "sub.example-2022-4-26-13-50-36-extra.com"
        }
    ]
}
Url variables
:hosting_id{{hosting_id}}The hosting identifier
Response Code:
201 Created
Response Body:
{
    "responseId": "1_09c1d8f7cfd5af10a49e122ffc3b5b6535d0d48a",
    "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"
        },
        {
            "name": "example-2022-4-26-13-50-36-extra.com",
            "forward": false,
            "primary": false
        }
    ]
}