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:
site_id is fbab4927-e354-4044-b226-29ac0fbd20ca environment_id is c84ce214-69b9-4a32-8e67-880672cf1d38 company_id is bdd25d71-5706-4890-870f-1adda17c505dSuccessfully found backups
No or invalid API key provided to the request
Could not find the environment or the user does not have permissions to retrieve data
Error occurred while retrieving backups
{- "environment": {
- "display_name": "MyEnvironment",
- "backups": [
- {
- "id": 123456789,
- "name": "mySiteName-1234567890-backupType",
- "note": "Daily Auto Backup",
- "type": "manual",
- "created_at": 1665382600770
}
]
}
}Successfully found downloadable backups
No or invalid API key provided to the request
Could not find the environment or the user does not have permissions to retrieve data
Error occurred while retrieving downloadable backups
{- "environment": {
- "display_name": "MyEnvironment",
- "downloadable_backups": [
- {
- "id": "1915fa3a-7ef4-4766-806d-71104be7deb0",
- "created_at": 1665382600770,
- "expires_at": 1665382600770,
- "is_generation_in_progress": true
}
]
}
}Restore backup to environment 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 restoring backup to environment
{- "backup_id": 123456789,
- "notified_user_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1"
}{- "operation_id": "backups:restore-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Restoring a backup to environment in progress",
- "status": 202
}Creating manual backup 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 manual backup
{- "tag": "my-awesome-backup"
}{- "operation_id": "backups:add-manual-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Adding a manual backup to environment in progress",
- "status": 202
}Removing backup 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 removing backup
{- "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
}