# Get list of company activity logs Source: https://api-docs.kinsta.com/api-reference/activity-logs/get-list-of-company-activity-logs /schemas/index.yaml get /company/{id}/activity-logs # Add additional SFTP account Source: https://api-docs.kinsta.com/api-reference/additional-sftp-users/add-additional-sftp-account /schemas/index.yaml post /sites/environments/{env_id}/additional-sftp-accounts # Enable or disable additional SFTP accounts Source: https://api-docs.kinsta.com/api-reference/additional-sftp-users/enable-or-disable-additional-sftp-accounts /schemas/index.yaml put /sites/environments/{env_id}/additional-sftp-accounts/toggle-status # Get list of additional SFTP accounts Source: https://api-docs.kinsta.com/api-reference/additional-sftp-users/get-list-of-additional-sftp-accounts /schemas/index.yaml get /sites/environments/{env_id}/additional-sftp-accounts # Remove additional SFTP account Source: https://api-docs.kinsta.com/api-reference/additional-sftp-users/remove-additional-sftp-account /schemas/index.yaml delete /sites/environments/additional-sftp-accounts/{sftp_account_id} # Get CDN Bandwidth Source: https://api-docs.kinsta.com/api-reference/analytics/get-cdn-bandwidth /schemas/index.yaml get /sites/environments/{env_id}/analytics/cdn-bandwidth # Get CDN Bandwidth usage Source: https://api-docs.kinsta.com/api-reference/analytics/get-cdn-bandwidth-usage /schemas/index.yaml get /sites/{site_id}/usage/cdn-bandwidth/this-month # Get Disk space Source: https://api-docs.kinsta.com/api-reference/analytics/get-disk-space /schemas/index.yaml get /sites/environments/{env_id}/analytics/diskspace # Get response code breakdown Source: https://api-docs.kinsta.com/api-reference/analytics/get-response-code-breakdown /schemas/index.yaml get /sites/environments/{env_id}/analytics/response-codes # Get Server Bandwidth Source: https://api-docs.kinsta.com/api-reference/analytics/get-server-bandwidth /schemas/index.yaml get /sites/environments/{env_id}/analytics/bandwidth # Get Server Bandwidth usage Source: https://api-docs.kinsta.com/api-reference/analytics/get-server-bandwidth-usage /schemas/index.yaml get /sites/{site_id}/usage/bandwidth/this-month # Get top ASNs requests Source: https://api-docs.kinsta.com/api-reference/analytics/get-top-asns-requests /schemas/index.yaml get /sites/environments/{env_id}/analytics/top-asns # Get top browsers requests Source: https://api-docs.kinsta.com/api-reference/analytics/get-top-browsers-requests /schemas/index.yaml get /sites/environments/{env_id}/analytics/top-browsers # Get top cities Source: https://api-docs.kinsta.com/api-reference/analytics/get-top-cities /schemas/index.yaml get /sites/environments/{env_id}/analytics/top-cities # Get top client ips Source: https://api-docs.kinsta.com/api-reference/analytics/get-top-client-ips /schemas/index.yaml get /sites/environments/{env_id}/analytics/top-client-ips # Get top countries Source: https://api-docs.kinsta.com/api-reference/analytics/get-top-countries /schemas/index.yaml get /sites/environments/{env_id}/analytics/top-countries # Get top hosts requests Source: https://api-docs.kinsta.com/api-reference/analytics/get-top-hosts-requests /schemas/index.yaml get /sites/environments/{env_id}/analytics/top-hosts # Get top referrers requests Source: https://api-docs.kinsta.com/api-reference/analytics/get-top-referrers-requests /schemas/index.yaml get /sites/environments/{env_id}/analytics/top-referrers # Get top user agents requests Source: https://api-docs.kinsta.com/api-reference/analytics/get-top-user-agents-requests /schemas/index.yaml get /sites/environments/{env_id}/analytics/top-uas # Get Visits Source: https://api-docs.kinsta.com/api-reference/analytics/get-visits /schemas/index.yaml get /sites/environments/{env_id}/analytics/visits # Get visits dispersion Source: https://api-docs.kinsta.com/api-reference/analytics/get-visits-dispersion /schemas/index.yaml get /sites/environments/{env_id}/analytics/visits-dispersion # Get Visits usage Source: https://api-docs.kinsta.com/api-reference/analytics/get-visits-usage /schemas/index.yaml get /sites/{site_id}/usage/visits/this-month # Get list of company API Keys Source: https://api-docs.kinsta.com/api-reference/api-keys/get-list-of-company-api-keys /schemas/index.yaml get /company/{id}/api-keys # Validate API Key Source: https://api-docs.kinsta.com/api-reference/authentication/validate-api-key /schemas/index.yaml get /validate # Get list of available regions Source: https://api-docs.kinsta.com/api-reference/available-regions/get-list-of-available-regions /schemas/index.yaml get /company/{id}/available-regions # Add a downloadable backup to an environment Source: https://api-docs.kinsta.com/api-reference/backups/add-a-downloadable-backup-to-an-environment /schemas/index.yaml post /sites/environments/{env_id}/downloadable-backups # Add a manual backup to an environment Source: https://api-docs.kinsta.com/api-reference/backups/add-a-manual-backup-to-an-environment /schemas/index.yaml post /sites/environments/{env_id}/manual-backups # Get downloadable backups Source: https://api-docs.kinsta.com/api-reference/backups/get-downloadable-backups /schemas/index.yaml get /sites/environments/{env_id}/downloadable-backups # Get manual, schedule and system generated backups Source: https://api-docs.kinsta.com/api-reference/backups/get-manual-schedule-and-system-generated-backups /schemas/index.yaml get /sites/environments/{env_id}/backups # Get the date of the next available downloadable backup Source: https://api-docs.kinsta.com/api-reference/backups/get-the-date-of-the-next-available-downloadable-backup /schemas/index.yaml get /sites/environments/{env_id}/next-downloadable-backup-available # Remove a WP site environment backup Source: https://api-docs.kinsta.com/api-reference/backups/remove-a-wp-site-environment-backup /schemas/index.yaml delete /sites/environments/backups/{backup_id} # Restore a scheduled or manual or system generated backup to an environment Source: https://api-docs.kinsta.com/api-reference/backups/restore-a-scheduled-or-manual-or-system-generated-backup-to-an-environment /schemas/index.yaml post /sites/environments/{target_env_id}/backups/restore # Get list of company users Source: https://api-docs.kinsta.com/api-reference/company-users/get-list-of-company-users /schemas/index.yaml get /company/{id}/users # Create a domain DNS record Source: https://api-docs.kinsta.com/api-reference/domains/create-a-domain-dns-record /schemas/index.yaml post /domains/{domain_id}/dns-records # Delete domain DNS record Source: https://api-docs.kinsta.com/api-reference/domains/delete-domain-dns-record /schemas/index.yaml delete /domains/{domain_id}/dns-records # Get list of domain DNS records by domain ID Source: https://api-docs.kinsta.com/api-reference/domains/get-list-of-domain-dns-records-by-domain-id /schemas/index.yaml get /domains/{domain_id}/dns-records # Get list of domains by company ID Source: https://api-docs.kinsta.com/api-reference/domains/get-list-of-domains-by-company-id /schemas/index.yaml get /domains # Update a domain DNS record Source: https://api-docs.kinsta.com/api-reference/domains/update-a-domain-dns-record /schemas/index.yaml put /domains/{domain_id}/dns-records # Get site logs Source: https://api-docs.kinsta.com/api-reference/logs/get-site-logs /schemas/index.yaml get /sites/environments/{env_id}/logs # Get the status information of an operation Source: https://api-docs.kinsta.com/api-reference/operations/get-the-status-information-of-an-operation /schemas/index.yaml get /operations/{operation_id} # Clear Site CDN Cache Source: https://api-docs.kinsta.com/api-reference/wordpress-cdn/clear-site-cdn-cache /schemas/index.yaml post /sites/cdn/clear-cache # Update CDN Image Optimization Source: https://api-docs.kinsta.com/api-reference/wordpress-cdn/update-cdn-image-optimization /schemas/index.yaml put /sites/cdn/image-optimization # Clear Site Edge Cache Source: https://api-docs.kinsta.com/api-reference/wordpress-edge-caching/clear-site-edge-cache /schemas/index.yaml post /sites/edge-caching/clear # Update Site Edge Cache Status Source: https://api-docs.kinsta.com/api-reference/wordpress-edge-caching/update-site-edge-cache-status /schemas/index.yaml put /sites/edge-caching/status # Add new site domain Source: https://api-docs.kinsta.com/api-reference/wordpress-site-domains/add-new-site-domain /schemas/index.yaml post /sites/environments/{env_id}/domains # Change primary domain of an environment Source: https://api-docs.kinsta.com/api-reference/wordpress-site-domains/change-primary-domain-of-an-environment /schemas/index.yaml put /sites/environments/{env_id}/change-primary-domain # Delete one or more site domains Source: https://api-docs.kinsta.com/api-reference/wordpress-site-domains/delete-one-or-more-site-domains /schemas/index.yaml delete /sites/environments/{env_id}/domains # Get list of site domains for the environment Source: https://api-docs.kinsta.com/api-reference/wordpress-site-domains/get-list-of-site-domains-for-the-environment /schemas/index.yaml get /sites/environments/{env_id}/domains # Get list of verification and pointing records for the site domain Source: https://api-docs.kinsta.com/api-reference/wordpress-site-domains/get-list-of-verification-and-pointing-records-for-the-site-domain /schemas/index.yaml get /sites/environments/domains/{site_domain_id}/verification-records # Change PHP allocation settings for a premium staging environment Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/change-php-allocation-settings-for-a-premium-staging-environment /schemas/index.yaml post /sites/environments/{env_id}/change-environment-php-allocation # Change PHP allocation settings for a site's live and standard staging environments Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/change-php-allocation-settings-for-a-sites-live-and-standard-staging-environments /schemas/index.yaml post /sites/{site_id}/change-site-php-allocation # Change SFTP/SSH password expiration interval Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/change-sftpssh-password-expiration-interval /schemas/index.yaml post /sites/environments/{env_id}/ssh/change-expiration-interval # Change webroot subfolder of environment Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/change-webroot-subfolder-of-environment /schemas/index.yaml post /sites/environments/{env_id}/change-webroot-subfolder # Check if WP admin user exists by email Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/check-if-wp-admin-user-exists-by-email /schemas/index.yaml get /sites/environments/{env_id}/wpa-user-exists # Clone an environment Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/clone-an-environment /schemas/index.yaml post /sites/{site_id}/environments/clone # Create a plain environment (no WordPress installed) Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/create-a-plain-environment-no-wordpress-installed /schemas/index.yaml post /sites/{site_id}/environments/plain # Create a WordPress site environment Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/create-a-wordpress-site-environment /schemas/index.yaml post /sites/{site_id}/environments # Create WP admin user Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/create-wp-admin-user /schemas/index.yaml post /sites/environments/{env_id}/wpa-create-user # Delete a WordPress site environment Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/delete-a-wordpress-site-environment /schemas/index.yaml delete /sites/environments/{env_id} # Enable/Disable SFTP/SSH Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/enabledisable-sftpssh /schemas/index.yaml post /sites/environments/{env_id}/ssh/set-status # Enable/Disable SFTP/SSH password access Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/enabledisable-sftpssh-password-access /schemas/index.yaml post /sites/environments/{env_id}/ssh/set-password-status # Generate phpMyAdmin login link Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/generate-phpmyadmin-login-link /schemas/index.yaml post /sites/environments/{env_id}/pma-login-token # Generate SFTP password Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/generate-sftp-password /schemas/index.yaml post /sites/environments/{env_id}/ssh/generate-password # Get environment redirect rules Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/get-environment-redirect-rules /schemas/index.yaml get /sites/environments/{env_id}/redirect-rules # Get list of files for environment Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/get-list-of-files-for-environment /schemas/index.yaml get /sites/environments/{env_id}/file-list # Get SFTP/SSH connections config Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/get-sftpssh-connections-config /schemas/index.yaml get /sites/{site_id}/environments/{env_id}/ssh/config # Get SFTP/SSH IP allowlist Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/get-sftpssh-ip-allowlist /schemas/index.yaml get /sites/environments/{env_id}/ssh/get-allowed-ips # Get SFTP/SSH password Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/get-sftpssh-password /schemas/index.yaml get /sites/environments/{env_id}/ssh/password # Get SFTP/SSH status Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/get-sftpssh-status /schemas/index.yaml get /sites/environments/{env_id}/ssh/get-status # Get site environments Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/get-site-environments /schemas/index.yaml get /sites/{site_id}/environments # Get WP admin login link by email Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/get-wp-admin-login-link-by-email /schemas/index.yaml post /sites/environments/{env_id}/wpa-login-url # Push a WordPress site environment Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/push-a-wordpress-site-environment /schemas/index.yaml put /sites/{site_id}/environments # Run a WP CLI command Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/run-a-wp-cli-command /schemas/index.yaml post /sites/environments/{env_id}/run-wp-cli-command # Update redirect rules Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/update-redirect-rules /schemas/index.yaml post /sites/environments/{env_id}/redirect-rules # Update SFTP/SSH IP allowlist Source: https://api-docs.kinsta.com/api-reference/wordpress-site-environments/update-sftpssh-ip-allowlist /schemas/index.yaml post /sites/environments/{env_id}/ssh/set-allowed-ips # Bulk update WP Site plugins Source: https://api-docs.kinsta.com/api-reference/wordpress-site-themes-&-plugins/bulk-update-wp-site-plugins /schemas/index.yaml put /sites/environments/{env_id}/plugins/bulk-update # Bulk update WP Site themes Source: https://api-docs.kinsta.com/api-reference/wordpress-site-themes-&-plugins/bulk-update-wp-site-themes /schemas/index.yaml put /sites/environments/{env_id}/themes/bulk-update # Get list of WordPress Site plugins Source: https://api-docs.kinsta.com/api-reference/wordpress-site-themes-&-plugins/get-list-of-wordpress-site-plugins /schemas/index.yaml get /sites/environments/{env_id}/plugins This endpoint is deprecated. Please use Get Wordpress Plugins instead. # Get list of WordPress Site themes Source: https://api-docs.kinsta.com/api-reference/wordpress-site-themes-&-plugins/get-list-of-wordpress-site-themes /schemas/index.yaml get /sites/environments/{env_id}/themes This endpoint is deprecated. Please use Get Wordpress Themes instead. # Get list of WP Site plugins Source: https://api-docs.kinsta.com/api-reference/wordpress-site-themes-&-plugins/get-list-of-wp-site-plugins /schemas/index.yaml get /sites/environments/{env_id}/wp-plugins # Get list of WP Site themes Source: https://api-docs.kinsta.com/api-reference/wordpress-site-themes-&-plugins/get-list-of-wp-site-themes /schemas/index.yaml get /sites/environments/{env_id}/wp-themes # Update WP Plugin Source: https://api-docs.kinsta.com/api-reference/wordpress-site-themes-&-plugins/update-wp-plugin /schemas/index.yaml put /sites/environments/{env_id}/plugins # Update WP Theme Source: https://api-docs.kinsta.com/api-reference/wordpress-site-themes-&-plugins/update-wp-theme /schemas/index.yaml put /sites/environments/{env_id}/themes # Clear Site Cache Source: https://api-docs.kinsta.com/api-reference/wordpress-site-tools/clear-site-cache /schemas/index.yaml post /sites/tools/clear-cache # Get Force HTTPS status Source: https://api-docs.kinsta.com/api-reference/wordpress-site-tools/get-force-https-status /schemas/index.yaml get /sites/environments/{env_id}/force-https-status # Get list of denied IPs Source: https://api-docs.kinsta.com/api-reference/wordpress-site-tools/get-list-of-denied-ips /schemas/index.yaml get /sites/tools/denied-ips # Modify an Environment's PHP Version Source: https://api-docs.kinsta.com/api-reference/wordpress-site-tools/modify-an-environments-php-version /schemas/index.yaml put /sites/tools/modify-php-version # Restart an Environment's PHP Engine Source: https://api-docs.kinsta.com/api-reference/wordpress-site-tools/restart-an-environments-php-engine /schemas/index.yaml post /sites/tools/restart-php # Search and replace Source: https://api-docs.kinsta.com/api-reference/wordpress-site-tools/search-and-replace /schemas/index.yaml post /sites/tools/search-and-replace # Set Force HTTPS status Source: https://api-docs.kinsta.com/api-reference/wordpress-site-tools/set-force-https-status /schemas/index.yaml post /sites/environments/{env_id}/force-https-status # Update denied IP list Source: https://api-docs.kinsta.com/api-reference/wordpress-site-tools/update-denied-ip-list /schemas/index.yaml put /sites/tools/denied-ips # Clone existing site Source: https://api-docs.kinsta.com/api-reference/wordpress-sites/clone-existing-site /schemas/index.yaml post /sites/clone # Create a plain site Source: https://api-docs.kinsta.com/api-reference/wordpress-sites/create-a-plain-site /schemas/index.yaml post /sites/plain # Create a site Source: https://api-docs.kinsta.com/api-reference/wordpress-sites/create-a-site /schemas/index.yaml post /sites # Delete a site Source: https://api-docs.kinsta.com/api-reference/wordpress-sites/delete-a-site /schemas/index.yaml delete /sites/{site_id} # Get list of company sites Source: https://api-docs.kinsta.com/api-reference/wordpress-sites/get-list-of-company-sites /schemas/index.yaml get /sites # Get site by ID Source: https://api-docs.kinsta.com/api-reference/wordpress-sites/get-site-by-id /schemas/index.yaml get /sites/{site_id} # Reset a site Source: https://api-docs.kinsta.com/api-reference/wordpress-sites/reset-a-site /schemas/index.yaml post /sites/{site_id}/reset-site # Get list of company plugins Source: https://api-docs.kinsta.com/api-reference/wordpress-themes-&-plugins/get-list-of-company-plugins /schemas/index.yaml get /company/{id}/wp-plugins # Get list of company themes Source: https://api-docs.kinsta.com/api-reference/wordpress-themes-&-plugins/get-list-of-company-themes /schemas/index.yaml get /company/{id}/wp-themes # Activity Logs Source: https://api-docs.kinsta.com/pages/activity-logs/description The `activity-logs` endpoint can be used to retrieve the data from the [Company Activity Log](https://kinsta.com/docs/company-settings/activity-log/#company-activity-log). You can obtain the `company_id` from [MyKinsta](https://my.kinsta.com/) > **username** > **Company settings** > **Billing details**. The `company_id` is also shown in the URL in MyKinsta, for example in the URL `https://my.kinsta.com/?idCompany=bdd25d71-5706-4890-870f-1adda17c505d` the `company_id` is `bdd25d71-5706-4890-870f-1adda17c505d`. # Additional SFTP Users Source: https://api-docs.kinsta.com/pages/additional-sftp-users/description You can use the `additional SFTP users` endpoint to: * [Enable or disable additional SFTP accounts](https://kinsta.com/docs/wordpress-hosting/connecting-with-sftp/#disable-enable-additional-sftp-users). * [Add additional SFTP accounts](https://kinsta.com/docs/wordpress-hosting/connecting-with-sftp/#additional-sftp-users). * Get a list of additional SFTP accounts. * [Remove additional SFTP accounts](https://kinsta.com/docs/wordpress-hosting/connecting-with-sftp/#remove-an-sftp-user). You can obtain the `environment_id` using the `GET` request with the [WordPress Site Environments](https://api-docs.kinsta.com/tag/WordPress-Site-Environments#operation/getSiteEnvironments) 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`: * 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` The `sftp_account_id` is shown when you `GET` the list of additional SFTP users. # Analytics Source: https://api-docs.kinsta.com/pages/analytics/description With the `Analytics` endpoint, you can `GET` the following analytics data: * [Visits, server bandwidth, and CDN bandwidth usage](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#plan-usage-distribution). * [CDN bandwidth](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#cdn-bandwidth) * [Visits](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#visits) * [Sever bandwidth](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#bandwidth) * [Disk space](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#disk-space) * [Top Countries](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#top-countries) * [Top Cities](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#top-cities) * [Top Client IPs](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#top-client-ips) * [Visit Dispersion](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#dispersion) * [Response Code Breakdown](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#response-code-breakdown) You can obtain the `environment_id` using the `GET` request with the [WordPress Site Environments](https://api-docs.kinsta.com/tag/WordPress-Site-Environments#operation/getSiteEnvironments) 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`: * 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` # API Keys Source: https://api-docs.kinsta.com/pages/api-keys/description The `api-keys` endpoint can be used to retrieve the list of [API Keys](https://kinsta.com/docs/kinsta-api/#authentication-and-user-access-api-key) from your MyKinsta company. You can obtain the `company_id` from [MyKinsta](https://my.kinsta.com/) > **username** > **Company settings** > **Billing details**. The `company_id` is also shown in the URL in MyKinsta, for example in the URL `https://my.kinsta.com/?idCompany=bdd25d71-5706-4890-870f-1adda17c505d` the `company_id` is `bdd25d71-5706-4890-870f-1adda17c505d`. # Authentication Source: https://api-docs.kinsta.com/pages/authentication/description The `authentication` endpoint validates the status of your API key. If the API key is valid, it shows details of the key including when the key expires. # Available Regions Source: https://api-docs.kinsta.com/pages/available-regions/description With the `avaiable-regions` endpoint, you an get a list of [Data Center Locations](https://kinsta.com/docs/service-information/data-center-locations/) that are available for the sites within your company. You can obtain the `company_id` from [MyKinsta](https://my.kinsta.com/) > **username** > **Company settings** > **Billing details**. The `company_id` is also shown in the URL in MyKinsta, for example in the URL `https://my.kinsta.com/?idCompany=bdd25d71-5706-4890-870f-1adda17c505d` the `company_id` is `bdd25d71-5706-4890-870f-1adda17c505d`. # Backups Source: https://api-docs.kinsta.com/pages/backups/description You can use `backups` endpoint to get a list of your site's [backups](https://kinsta.com/docs/wordpress-hosting/wordpress-backups) and a list of all [downloadable backups](https://kinsta.com/docs/wordpress-hosting/wordpress-backups#downloadable-backups). You can send a `POST` request to [restore a backup](https://kinsta.com/docs/wordpress-hosting/wordpress-backups#restore-wordpress-backups) to any of your site's environments. You can also send a `DEL` request to remove a backup from any of your site's environments. You can obtain the `environment_id` using the `GET` request with the [WordPress Site Environments](https://api-docs.kinsta.com/tag/WordPress-Site-Environments#operation/getSiteEnvironments) 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`: * 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` # Company Users Source: https://api-docs.kinsta.com/pages/company-users/description With the `users` endpoint, you can get a list of your [company’s users](https://kinsta.com/docs/company-settings/user-management/), this includes their id, email address, full name, and a link to their profile picture. You can obtain the `company_id` from [MyKinsta](https://my.kinsta.com/) > **username** > **Company settings** > **Billing details**. The `company_id` is also shown in the URL in MyKinsta, for example in the URL `https://my.kinsta.com/?idCompany=bdd25d71-5706-4890-870f-1adda17c505d` the `company_id` is `bdd25d71-5706-4890-870f-1adda17c505d`. # Domains Source: https://api-docs.kinsta.com/pages/domains/description If you use [Kinsta’s DNS](https://kinsta.com/docs/wordpress-hosting/wordpress-domains/dns/), you can use the `domains` endpoint to: * Get a list of domains. * Get a list of DNS records for a domain. * Create a DNS record. * Update a DNS record. * Delete a DNS record. To get the list of domains, you need the `company ID`. You can obtain the company\_id from [MyKinsta](https://my.kinsta.com/) > **username** > **Company settings** > **Billing details**. The domains list will give you the `domain_id` to get the list of DNS records. # Introduction Source: https://api-docs.kinsta.com/pages/introduction Download OpenAPI Specification Welcome to the API Reference of Kinsta’s REST API. With this API, you can leverage some of our platform's features in your own applications and automated workflows. Our API receives and returns JSON formatted requests and responses. Throughout this reference, you can see the schema of our API endpoints along with explanations and usage examples. You can try out the API with the “Try it” console and find code examples in a few popular programming languages. We’ve also made it easy to copy the code examples so you can quickly incorporate them into your application or workflow. **Note:** To use the “Try it” console, you’ll need your API key (Bearer Token in the console) and any required parameters for the endpoint you want to test. For more details on getting started and some common use cases, check out [Kinsta API](https://kinsta.com/docs/kinsta-api). # Logs Source: https://api-docs.kinsta.com/pages/logs/description Use the `logs` endpoint to get your site's [log files](https://kinsta.com/docs/wordpress-hosting/wordpress-troubleshooting/view-server-logs), including the `error.log`, `kinsta-cache-perf.log`, and `access.log`. This has a rate limit of 35 requests per minute. You can obtain the `environment_id` using the `GET` request with the [WordPress Site Environments](https://api-docs.kinsta.com/tag/WordPress-Site-Environments#operation/getSiteEnvironments) 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`: * 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` # Operations Source: https://api-docs.kinsta.com/pages/operations/description The goal of the `operations` endpoint is to check the progress of ongoing operations triggered by the API. For example, Site Creation provides `202 Accepted` response for the first call, and provides an `operation_id`, that you can use as a parameter of this endpoint. # WordPress CDN Source: https://api-docs.kinsta.com/pages/wordpress-cdn/description [Kinsta's premium CDN](https://kinsta.com/docs/wordpress-hosting/wordpress-cdn/kinsta-cdn) powered by Cloudflare helps to maximize the performance of your site. With the `cdn` endpoint you can: * Clear the CDN cache for your sites. * Change the [image optimization settings](https://kinsta.com/docs/wordpress-hosting/wordpress-cdn/kinsta-cdn/#image-optimization-1). You can obtain the `environment_id` using the `GET` request with the [WordPress Site Environments](https://api-docs.kinsta.com/tag/WordPress-Site-Environments#operation/getSiteEnvironments) 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`: * 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` You can obtain the `cdn_cache_id` using the `GET` request with the [WordPress Site Environments](https://api-docs.kinsta.com/tag/WordPress-Site-Environments#operation/getSiteEnvironments) endpoint. The CDN endpoints may trigger **longer tasks** (from a few seconds to around a minute) on your environments. This is why they provide `202 Accepted` response, with an [`operation_id`](https://api-docs.kinsta.com/tag/Operations) in the body. To check the progress, you can use the `/operations` endpoint. # WordPress Edge Caching Source: https://api-docs.kinsta.com/pages/wordpress-edge-caching/description [Edge caching](https://kinsta.com/docs/wordpress-hosting/caching/edge-caching) saves your site/page cache to Cloudflare's global network of data centers. With the `edge-caching` endpoint, you can: * Clear edge caching for your sites. * Enable or disable edge caching. You can obtain the `environment_id` using the `GET` request with the [WordPress Site Environments](https://api-docs.kinsta.com/tag/WordPress-Site-Environments#operation/getSiteEnvironments) 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`: * 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` Most of these edge caching endpoints will trigger **longer tasks** (from a few seconds to around a minute) on your environments. This is why they provide `202 Accepted` response, with an [`operation_id`](https://api-docs.kinsta.com/tag/Operations) in the body. To check the progress, you can use the `/operations` endpoint. # WordPress Site Domains Source: https://api-docs.kinsta.com/pages/wordpress-site-domains/description With the `domains` endpoint, you can: * Use a `POST` request to [add a new domain](https://kinsta.com/docs/wordpress-hosting/wordpress-domains) to a WordPress site * Use a `DEL` request to remove a domain. * Use a `PUT` request to [change the primary domain](https://kinsta.com/docs/wordpress-hosting/wordpress-domains/#change-your-primary-domain). You can obtain the `environment_id` and `domain_ids` using the `GET` request with the [WordPress Site Environments](https://api-docs.kinsta.com/tag/WordPress-Site-Environments#operation/getSiteEnvironments) 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`: * 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` # WordPress Site Environments Source: https://api-docs.kinsta.com/pages/wordpress-site-environments/description The available WordPress site environments include: * [Live](https://kinsta.com/blog/wordpress-api/) * [Staging](https://kinsta.com/docs/wordpress-hosting/staging-environment) * [Premium Staging](https://kinsta.com/docs/wordpress-hosting/staging-environment#premium-staging-environments) Using the `environments` endpoint, you can: * Get information about your site’s environments. * [Create a new environment](https://kinsta.com/docs/wordpress-hosting/staging-environment#create-wordpress-staging-environment) (with or [without WordPress](https://kinsta.com/docs/wordpress-hosting/staging-environment#option-3-dont-install-wordpress-empty-environment)). * [Push an environment](https://kinsta.com/docs/wordpress-hosting/wordpress-push-environments/) * [Clone an existing environment](https://kinsta.com/docs/wordpress-hosting/staging-environment#option-1-clone-an-existing-environment). * [Delete an environment](https://kinsta.com/docs/wordpress-hosting/staging-environment#delete-and-refresh-staging-environment). * [Change PHP allocation settings](https://kinsta.com/docs/wordpress-hosting/php/wordpress-php-performance/#change-php-performance). * [Change the webroot subfolder](https://kinsta.com/docs/wordpress-hosting/site-management/#change-your-sites-path) of an environment. * [Update redirect rules](https://kinsta.com/docs/wordpress-hosting/redirect-rules/). * [Manage SFTP access and settings](https://kinsta.com/docs/wordpress-hosting/connecting-with-sftp/). * [Run WP CLI commands](https://kinsta.com/docs/wordpress-hosting/site-management/wordpress-wp-cli/). * [Generate a phpMyAdmin login link](https://kinsta.com/docs/wordpress-hosting/database-management/wordpress-database-access/#phpmyadmin). * [Create WP Admin logins and check if users already exist](https://kinsta.com/docs/wordpress-hosting/site-management/wordpress-wp-admin/). You can obtain the `site_id` using the `GET` request with the [WordPress Sites](https://api-docs.kinsta.com/tag/WordPress-Sites#operation/getSites) endpoint. The `site_id` is also shown 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`: * 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` The `change-environment-php-allocation` and `change-site-php-allocation` endpoints are not currently available to customers who have any of following plans: Single 1.25M or above, WP 60 or above, Agency, or a custom plan. The [PHP memory limit](https://kinsta.com/docs/wordpress-hosting/php/#php-memory-limit) and number of [PHP threads](https://kinsta.com/docs/wordpress-hosting/php/#php-threads) must add up to the existing total memory pool of the site. You can only change the total memory pool within [PHP performance](https://kinsta.com/docs/wordpress-hosting/php/wordpress-php-performance/) in [MyKinsta](https://my.kinsta.com/). `change-environment-php-allocation` can only be used for premium staging environments. `change-site-php-allocation` updates the PHP memory limit of the live environment and all standard staging environments. Standard staging environments will always have 2 PHP threads regardless of their memory allocated. You cannot use this endpoint to update premium staging environments. When using the `change-webroot-subfolder-of-environment` endpoint, the default web root path for a site is `/www/$site_path/public`. This default path cannot be changed, but you can append a subfolder, for example, `/www/$site_path/public/site`. To check the current path, use the `get-site-environments` endpoint, which displays the `web-root` field indicating any subfolder appended to `/public`. To revert the path to the default, send the request with an empty string `''` as the subfolder. # WordPress Site Themes & Plugins Source: https://api-docs.kinsta.com/pages/wordpress-site-themes-plugins/description With the site `plugins` and `themes` endpoints, you can get a list of your site's [plugins and themes](https://kinsta.com/docs/wordpress-hosting/site-management/plugins-themes). You can also send a `PUT` request to update your plugins or themes individually or as a bulk update. You can obtain the `environment_id` using the `GET` request with the [WordPress Site Environments](https://api-docs.kinsta.com/tag/WordPress-Site-Environments#operation/getSiteEnvironments) 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`: * 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` # WordPress Site Tools Source: https://api-docs.kinsta.com/pages/wordpress-site-tools/description With the `tools` endpoint, you can perform actions on sites like: * [Clear site cache](https://kinsta.com/docs/wordpress-hosting/caching/site-caching#clear-cache-in-mykinsta). * [Restart PHP](https://kinsta.com/docs/wordpress-hosting/site-management/php#restart-php). * [Modify PHP version](https://kinsta.com/docs/wordpress-hosting/site-management/php#updating-php). * Get and update a list of [denied IP addresses](https://kinsta.com/docs/wordpress-hosting/site-management/block-ip-address). * [Update the Force HTTPS status](https://kinsta.com/docs/wordpress-hosting/mykinsta-tools/#force-https). You can obtain the `environment_id` using the `GET` request with the [WordPress Site Environments](https://api-docs.kinsta.com/tag/WordPress-Site-Environments#operation/getSiteEnvironments) 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`: * 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` Most of these tool endpoints will trigger **longer tasks** (from a few seconds to around a minute) on your environments. This is why they provide `202 Accepted` response, with an [`operation_id`](https://api-docs.kinsta.com/tag/Operations/) in the body. To check the progress, you can use the `/operations` endpoint. # WordPress Sites Source: https://api-docs.kinsta.com/pages/wordpress-sites/description 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](https://kinsta.com/docs/wordpress-hosting/wordpress-getting-started/new-site), [staging](https://kinsta.com/docs/wordpress-hosting/staging-environment), and/or [premium staging](https://kinsta.com/docs/wordpress-hosting/staging-environment#premium-staging-environments)). You can also perform actions like: * [Create a new site](https://kinsta.com/docs/wordpress-hosting/wordpress-getting-started/new-site#option-1-install-wordpress). * [Clone an existing site](https://kinsta.com/docs/wordpress-hosting/wordpress-getting-started/new-site#option-3-clone-an-existing-environment). * [Create a plain site without WordPress (empty environment)](https://kinsta.com/docs/wordpress-hosting/wordpress-getting-started/new-site#option-2-dont-install-wordpress-empty-environment). * [Delete a site](https://kinsta.com/docs/wordpress-hosting/site-management#delete-a-wordpress-site). * [Reset a site](https://kinsta.com/docs/wordpress-hosting/site-management/#reset-a-wordpress-site). You can also `GET` the following [Analytics](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/) data for each site: * [Visits](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#visits) * [Bandwidth](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#bandwidth) * [CDN bandwidth](https://kinsta.com/docs/wordpress-hosting/wordpress-analytics-mykinsta/#cdn-bandwidth) 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](https://my.kinsta.com/) > **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. # WordPress Themes & Plugins Source: https://api-docs.kinsta.com/pages/wordpress-themes-plugins/description Use the `wp-plugins` and `wp-themes` endpoints to `GET` a list of [plugins and themes](https://kinsta.com/docs/wordpress-hosting/wordpress-plugins-themes/) for all of the sites within your company. You can obtain the `company_id` from [MyKinsta](https://my.kinsta.com/) > **username** > **Company settings** > **Billing details**. The `company_id` is also shown in the URL in MyKinsta, for example in the URL `https://my.kinsta.com/?idCompany=bdd25d71-5706-4890-870f-1adda17c505d` the `company_id` is `bdd25d71-5706-4890-870f-1adda17c505d`.