With the domains
endpoint, you can use a POST
request to add a new domain to a WordPress site, and use a DEL
request to remove a domain.
You can obtain the environment_id
using the GET
request with the WordPress Site Environments endpoint.
The environment_id
is also shown after the site_id
in the URL in MyKinsta when you access the environment, for example in the URL https://my.kinsta.com/sites/details/fbab4927-e354-4044-b226-29ac0fbd20ca/c84ce214-69b9-4a32-8e67-880672cf1d38?idCompany=bdd25d71-5706-4890-870f-1adda17c505d
:
site_id
is fbab4927-e354-4044-b226-29ac0fbd20ca
environment_id
is c84ce214-69b9-4a32-8e67-880672cf1d38
company_id
is bdd25d71-5706-4890-870f-1adda17c505d
Site domain creation action started. Check MyKinsta for status
One or more of the required parameters were not provided to the request
No or invalid API key provided to the request
Error occurred while adding a site domain
{- "domain_name": "string",
- "is_wildcardless": false,
- "custom_ssl_key": "string",
- "custom_ssl_cert": "string"
}
{- "operation_id": "sites:add-domain-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Adding site domain in progress",
- "status": 202
}
Site domain deletion action started. Check MyKinsta for status
One or more of the required parameters were not provided to the request
No or invalid API key provided to the request
Error occurred while deleting site domains
{- "domain_ids": [
- "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "3b2b80af-576c-4fdc-ba4f-b596c83f15a1"
]
}
{- "operation_id": "sites:delete-domain-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Deleting site domain in progress",
- "status": 202
}