WordPress Site Domains

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.

Add new site domain

SecuritybearerAuth
Request
path Parameters
env_id
required
string <uuid>
Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
Request Body schema: application/json
domain_name
required
string
is_wildcardless
boolean
Default: false
custom_ssl_key
string
custom_ssl_cert
string
Responses
202

Site domain creation action started. Check MyKinsta for status

400

One or more of the required parameters were not provided to the request

401

No or invalid API key provided to the request

500

Error occurred while adding a site domain

post/sites/environments/{env_id}/domains
Request samples
application/json
{
  • "domain_name": "string",
  • "is_wildcardless": false,
  • "custom_ssl_key": "string",
  • "custom_ssl_cert": "string"
}
Response samples
application/json
{
  • "operation_id": "sites:add-domain-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Adding site domain in progress",
  • "status": 202
}

Delete one or more site domains

SecuritybearerAuth
Request
path Parameters
env_id
required
string <uuid>
Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
Request Body schema: application/json
domain_ids
required
Array of strings
Responses
202

Site domain deletion action started. Check MyKinsta for status

400

One or more of the required parameters were not provided to the request

401

No or invalid API key provided to the request

500

Error occurred while deleting site domains

delete/sites/environments/{env_id}/domains
Request samples
application/json
{
  • "domain_ids": [
    ]
}
Response samples
application/json
{
  • "operation_id": "sites:delete-domain-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Deleting site domain in progress",
  • "status": 202
}