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.
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.
Cloning Wordpress site 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 creating a site
{- "company": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "display_name": "Copy of First WP Site",
- "source_env_id": "0010cdaf-0b94-472e-86bd-7edf6fceaa1c"
}
{- "operation_id": "site:clone-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Cloning site in progress",
- "status": 202
}
Plain site 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 creating a site
{- "company": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "display_name": "First plain site",
- "region": "us-central1"
}
{- "operation_id": "sites:add-plain-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Adding plain site in progress",
- "status": 202
}
Site 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 creating a site
{- "company": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "display_name": "First site",
- "region": "us-central1",
- "install_mode": "new",
- "is_subdomain_multisite": false,
- "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"
}
{- "operation_id": "sites:add-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Adding site in progress",
- "status": 202
}
Successfully found sites
No or invalid API key provided to the request
Could not find the sites or the user does not have permissions to retrieve data
Error occurred while retrieving sites
{- "company": {
- "sites": [
- {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "name": "firstsite",
- "display_name": "First site",
- "status": "live",
- "siteLabels": [
- {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "name": "Do not remove"
}
]
}
]
}
}
Successfully found site by ID
No or invalid API key provided to the request
Could not find the site or the user does not have permissions to retrieve data
Error occurred while retrieving site by ID
{- "site": {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "name": "first-site",
- "display_name": "Site Name",
- "company_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "status": "live",
- "environments": [
- {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "name": "first-site",
- "display_name": "First site",
- "is_premium": false,
- "is_blocked": false,
- "domains": [
- {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "name": "example.com",
- "type": "live"
}
], - "primaryDomain": {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "name": "example.com",
- "type": "live"
}
}
]
}
}
Site 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 a site
{- "operation_id": "sites:delete-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Deleting site in progress",
- "status": 202
}