Backups

You can use backups endpoint to get a list of your site's backups and a list of all downloadable backups.

You can send a POST request to restore a backup 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 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

Get manual, schedule and system generated backups

SecuritybearerAuth
Request
path Parameters
env_id
required
string <uuid>
Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
Responses
200

Successfully found backups

401

No or invalid API key provided to the request

404

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

500

Error occurred while retrieving backups

get/sites/environments/{env_id}/backups
Request samples
Response samples
application/json
{
  • "environment": {
    }
}

Get downloadable backups

SecuritybearerAuth
Request
path Parameters
env_id
required
string <uuid>
Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
Responses
200

Successfully found downloadable backups

401

No or invalid API key provided to the request

404

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

500

Error occurred while retrieving downloadable backups

get/sites/environments/{env_id}/downloadable-backups
Request samples
Response samples
application/json
{
  • "environment": {
    }
}

Restore a scheduled or manual or system generated backup to an environment

SecuritybearerAuth
Request
path Parameters
target_env_id
required
string <uuid>
Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1
Request Body schema: application/json
backup_id
required
number
notified_user_id
required
string <uuid>
Responses
202

Restore backup to environment 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 restoring backup to environment

post/sites/environments/{target_env_id}/backups/restore
Request samples
application/json
{
  • "backup_id": 123456789,
  • "notified_user_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1"
}
Response samples
application/json
{
  • "operation_id": "backups:restore-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Restoring a backup to environment in progress",
  • "status": 202
}

Add a manual backup to an environment

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

Creating manual backup 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 manual backup

post/sites/environments/{env_id}/manual-backups
Request samples
application/json
{
  • "tag": "my-awesome-backup"
}
Response samples
application/json
{
  • "operation_id": "backups:add-manual-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Adding a manual backup to environment in progress",
  • "status": 202
}

Remove a WP site environment backup

SecuritybearerAuth
Request
path Parameters
backup_id
required
number
Example: 165424355
Responses
202

Removing backup 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 removing backup

delete/sites/environments/backups/{backup_id}
Request samples
Response samples
application/json
{
  • "operation_id": "backups:remove-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Removing a backup in progress. Use the operation_id to check the status.",
  • "status": 202
}