Kinsta API

Kinsta’s REST API (Application Programming Interface) is a powerful tool designed to allow developers to easily access and interact with your Kinsta account and projects. Our API provides a streamlined and efficient way to work with our platform, allowing you to efficiently retrieve data, perform actions, and automate tasks.

​​

For full details on available API endpoints, to download our OpenAPI specification, and to try out endpoints, see our API reference.

To connect with other developers and find in-depth tutorials, tips, and best practices for using Kinsta’s REST API, check out the Kinsta API category of our Kinsta Community forum.

Authentication and user access (API key)

To use Kinsta’s API, you need to generate an API key to authenticate and access your account through the API. You can generate multiple API keys.

Company owners, company administrators, and company developers can create API keys. The level of access to the API will depend on the user’s access. For example, an API key generated by a company developer will not have the same access as a key generated by a company owner or administrator.

  1. In MyKinsta, go to your username > Company settings > API Keys and click Create API Key.
  2. Choose an expiration or set a custom start date and number of hours for the key to expire.
  3. Give the key a name and click Generate.

When the API key is provided, this is the only time you can see it. Make sure you copy it and store it somewhere safe.

If you need to revoke access to an API key, click Revoke.

API endpoints

With Kinsta’s API, you can perform the following actions:

WordPress Hosting

  • Get a list of your company’s WordPress sites, details about a specific site, and details about a site’s environment.
  • Create a new WordPress site, clone an existing site, create an empty site without WordPress, and delete a site.
  • Create a new staging site, push a staging environment to live, and delete a staging environment.
  • Clear a site’s cache, restart and update the PHP, and get a list of denied IP addresses.
  • Change the PHP memory limit and number of PHP threads per environment.
  • Change your site’s path where your WordPress files (such as wp-config.phpwp-contentwp-admin, and wp-includes) are located.
  • Get and update your redirect rules.
  • Get your site’s SFTP/SSH status and enable or disable it.
  • Get a list of your site’s plugins and themes and update them.
  • Add or remove a domain.
  • Clear the edge cache and CDN cache on your site.
  • Get a list of additional SFTP accounts, enable, disable, add, and remove them.
  • Get a list of your site’s backups and downloadable backups, restore a backup to your site, and delete a backup.
  • Get the site’s log files.

Static Site Hosting

  • Get a list of your company’s static sites and details about a specific site, update your site’s settings, and delete a site.
  • Get the deployment details of a static site and manually or programmatically deploy your site.

Application Hosting

  • Get a list of your company’s applications and details about a specific application, including the deployment details and processes, update the application’s settings, and delete an application.
  • Get the deployment details of an application and manually or programmatically deploy your application.
  • Create an internal connection between your application and database.
  • Enable CDN and edge caching and clear the cache for both.

Database Hosting

  • Get a list of your company’s databases and details about a specific database, create a new database, update the database settings, and delete a database.

Company

  • Get a list of your company’s users, including their email address, full name, and a link to their profile picture.
  • Get a list of Data Center Locations that are available for the sites within your company.

DNS Management

  • Get a list of domains and DNS records for your site.
  • Create, update and delete DNS records.

Common use cases

Reporting

APIs can be used to read data so you can create your own reports or integrate Kinsta Services into your internal tracking systems. For example, if you run an agency and use an application that lists all of your clients, you can use the API to list all of the Kinsta-hosted WordPress sites, applications, and databases belonging to each client.

Scheduled tasks

You can create your own application to schedule tasks overnight that may impact your site’s performance or cause downtime. For example, clearing the site cache overnight can help minimize disruption for your site visitors.

Site management

Using Node.js with the API, you can create a site management Slackbot to save you time and help you manage your sites more efficiently. You can use the Slackbot for tasks like checking site status, clearing a site’s cache, and restarting a site’s PHP engine.

WordPress site creation

You can add a new WordPress site/install automatically using the API. For example, if you run an agency and want to be able to automate the site creation process without having to log in to MyKinsta each time, you can use the API to create the site and install WooCommerce, Yoast SEO, and Easy Digital Downloads.

You also have the option to create a WordPress Multisite installation (is_multisite TRUE) and configure a subdomain (is_subdomain_multisite TRUE) or subdirectory (is_subdomain_multisite FALSE) installation.

To check the status of site creation, use the Operations endpoint.

Check operation status

For potentially long-running operations (e.g. site creation, clearing cache, restarting PHP, etc.) the API does not immediately respond with the result. This helps prevent a potential blocked server thread or gateway timeout due to an operation taking a long time.

To check the status of an operation, use the /operations endpoint. When you start an operation, the immediate response from the API will include an operation_id to use with the /operations endpoint. For more details and examples, see the Operations reference.

Rate limits

To protect our API from being flooded with too many requests, the number of requests per minute is limited to the following:

  • 120 requests per minute per company ID identified from the API key.
  • 1000 requests per minute per IP address. This would come into force if you have access to multiple companies.
  • 5 requests per minute for resource creation, for example, creating a WordPress site.

To see your current rate limit status, check the RateLimit headers in the most recent API response. It is not currently possible to increase the rate limit.

Troubleshooting

If you make a request to an endpoint that your API key doesn’t have access to, you will receive an error message to let you know you do not have access. If you need access to that endpoint, a company owner or administrator will need to generate an API key for you.

API reference

For full details on available API endpoints, to download our OpenAPI specification, and to try out endpoints, see our API reference.

Was this article helpful?

© 2013 - 2025 Kinsta Inc. All rights reserved. Kinsta®, MyKinsta®, and DevKinsta® are trademarks owned by Kinsta Inc.The WordPress® trademark is the intellectual property of the WordPress Foundation, and the Woo® and WooCommerce® trademarks are the intellectual property of WooCommerce, Inc. Uses of the WordPress®, Woo®, and WooCommerce® names in this website are for identification purposes only and do not imply an endorsement by WordPress Foundation or WooCommerce, Inc. Kinsta is not endorsed or owned by, or affiliated with, the WordPress Foundation or WooCommerce, Inc. Legal information