WordPress Sites

With the sites endpoint, you can get a list of your company’s WordPress sites, details for a specific site, and details about a site’s environment (live, staging, and/or premium staging). You can also perform actions like:

Depending on the parameters, site creation might take around one to a few minutes. This is why this endpoint responds with 202 Accepted with an operation_id in the body, which you can use with the /operations endpoint to check the progress.

You can obtain the company_id from MyKinsta > username > Company settings > Billing details.

The company_id, site_id and environment_id are shown in the URL in MyKinsta when you access an 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:

  • The site_id is fbab4927-e354-4044-b226-29ac0fbd20ca
  • The environment_id is c84ce214-69b9-4a32-8e67-880672cf1d38
  • The company_id is bdd25d71-5706-4890-870f-1adda17c505d

Important: due to a delay in the operation initialization process, the site creation operation can return 404 Not Found in the first few seconds. So, when you integrate it into your script or application, please consider this delay when polling the operation status.

Clone existing site

SecuritybearerAuth
Request
Request Body schema: application/json
required
company
required
string
display_name
required
string
source_env_id
required
string
Responses
202

Cloning Wordpress site 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 creating a site

post/sites/clone
Request samples
application/json
{
  • "company": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "display_name": "Copy of First WP Site",
  • "source_env_id": "0010cdaf-0b94-472e-86bd-7edf6fceaa1c"
}
Response samples
application/json
{
  • "operation_id": "site:clone-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Cloning site in progress",
  • "status": 202
}

Create a plain site

SecuritybearerAuth
Request
Request Body schema: application/json
required
company
required
string
display_name
required
string
region
required
Responses
202

Plain site 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 creating a site

post/sites/plain
Request samples
application/json
{
  • "company": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "display_name": "First plain site",
  • "region": "us-central1"
}
Response samples
application/json
{
  • "operation_id": "sites:add-plain-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Adding plain site in progress",
  • "status": 202
}

Create a site

SecuritybearerAuth
Request
Request Body schema: application/json
required
company
required
string
display_name
required
string
region
required
install_mode
required
string
Deprecated
Default: "plain"
Enum: "new" "plain" "clone"
admin_email
required
string
admin_password
required
string
admin_user
required
string
site_title
required
string
wp_language
required
is_subdomain_multisite
boolean
is_multisite
boolean
woocommerce
boolean
wordpressseo
boolean
Responses
202

Site 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 creating a site

post/sites
Request samples
application/json
{
  • "company": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "display_name": "First site",
  • "region": "us-central1",
  • "install_mode": "new",
  • "is_subdomain_multisite": false,
  • "admin_email": "[email protected]",
  • "admin_password": "vJnFnN-~v)PxF[6k",
  • "admin_user": "admin",
  • "is_multisite": false,
  • "site_title": "My First Site",
  • "woocommerce": false,
  • "wordpressseo": false,
  • "wp_language": "en_US"
}
Response samples
application/json
{
  • "operation_id": "sites:add-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Adding site in progress",
  • "status": 202
}

Get list of company sites

SecuritybearerAuth
Request
query Parameters
company
required
string
Example: company=54fb80af-576c-4fdc-ba4f-b596c83f15a1
Responses
200

Successfully found sites

401

No or invalid API key provided to the request

404

Could not find the sites or the user does not have permissions to retrieve data

500

Error occurred while retrieving sites

get/sites
Request samples
Response samples
application/json
{
  • "company": {
    }
}

Get site by ID

SecuritybearerAuth
Request
path Parameters
site_id
required
string
Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
Responses
200

Successfully found site by ID

401

No or invalid API key provided to the request

404

Could not find the site or the user does not have permissions to retrieve data

500

Error occurred while retrieving site by ID

get/sites/{site_id}
Request samples
Response samples
application/json
{
  • "site": {
    }
}

Delete a site

SecuritybearerAuth
Request
path Parameters
site_id
required
string
Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
Responses
202

Site 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 a site

delete/sites/{site_id}
Request samples
Response samples
application/json
{
  • "operation_id": "sites:delete-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Deleting site in progress",
  • "status": 202
}