curl -L -X POST 'https://api.turso.tech/v3/organizations/{organizationId}/databases/{databaseId}/restore' \
-H 'Authorization: Bearer TOKEN'
curl -L -X POST 'https://api.turso.tech/v3/organizations/{organizationId}/databases/{databaseId}/restore' \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{ "name": "my-restored-database" }'
{
"database": {
"Name": "<string>",
"DbId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Hostname": "<string>",
"group": "<string>",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"regions": [
"<string>"
],
"primaryRegion": "<string>",
"delete_protection": true,
"deleted_at": "2023-11-07T05:31:56Z",
"group_deleted_at": "2023-11-07T05:31:56Z"
}
}Databases
Restore Database
Restore a database deleted within the last five days, exactly as it was at the moment it was deleted. Requires a paid plan, an admin or owner of the organization, and recovery enabled for the organization.
POST
/
v3
/
organizations
/
{organizationId}
/
databases
/
{databaseId}
/
restore
curl -L -X POST 'https://api.turso.tech/v3/organizations/{organizationId}/databases/{databaseId}/restore' \
-H 'Authorization: Bearer TOKEN'
curl -L -X POST 'https://api.turso.tech/v3/organizations/{organizationId}/databases/{databaseId}/restore' \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{ "name": "my-restored-database" }'
{
"database": {
"Name": "<string>",
"DbId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Hostname": "<string>",
"group": "<string>",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"regions": [
"<string>"
],
"primaryRegion": "<string>",
"delete_protection": true,
"deleted_at": "2023-11-07T05:31:56Z",
"group_deleted_at": "2023-11-07T05:31:56Z"
}
}Unlike the v1 endpoints, this endpoint identifies the organization and database
by UUID — use the
id field from
Retrieve Organization and the DbId
field from List Deleted Databases.curl -L -X POST 'https://api.turso.tech/v3/organizations/{organizationId}/databases/{databaseId}/restore' \
-H 'Authorization: Bearer TOKEN'
curl -L -X POST 'https://api.turso.tech/v3/organizations/{organizationId}/databases/{databaseId}/restore' \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{ "name": "my-restored-database" }'
Authorizations
Path Parameters
Body
application/json
Was this page helpful?