POST
/v1/databases/{targetDatabaseId}/restoreRestore database (destructive)⚠️ Destructive operation — this immediately and irreversibly overwrites all data in the target database with the contents of the specified backup. Any data written since the backup was taken will be lost. Ensure you have a recent backup of the target database before proceeding.
Replaces the data in an existing database from a backup. Connections and credentials are preserved — only the data layer is replaced.
Parameters
targetDatabaseIdstringpathrequiredRequest body
application/json
object
sourceobjectrequiredShow child attributes
backupIdstringrequiredID of the backup to restore from
databaseIdstringrequiredID of the database the backup belongs to
typestringrequired{
"source": {
"backupId": "string",
"databaseId": "string",
"type": "backup"
}
}Responses
object
dataobjectrequiredShow child attributes
branchIdnull | stringrequiredconnectionsarray of objectrequiredShow child attributes
Show array items
createdAtstring · date-timerequireddatabaseobjectrequiredShow child attributes
idstringrequirednamestringrequiredurlstring · urirequireddirectConnectionnull | objectDeprecated: use `endpoints.direct` instead.
Show child attributes
hoststringrequiredpassstringrequireduserstringrequiredendpointsobjectrequiredShow child attributes
accelerateobjectShow child attributes
hoststringrequiredportnumberrequireddirectobjectShow child attributes
hoststringrequiredportnumberrequiredpooledobjectShow child attributes
hoststringrequiredportnumberrequiredidstringrequiredkindstringrequirednamestringrequiredtypestringrequiredurlstring · urirequiredcreatedAtstring · date-timerequireddefaultConnectionIdnull | stringrequiredidstringrequiredisDefaultbooleanrequiredlogicalIdnull | stringrequirednamestringrequiredprojectobjectrequiredShow child attributes
idstringrequirednamestringrequiredurlstring · urirequiredregionnull | objectrequiredShow child attributes
idstringrequirednamestringrequiredsourceobjectrequiredShow child attributes
backupIdstringrequireddatabaseIdstringrequiredtypestringrequiredstatusstringrequiredtypestringrequiredurlstring · urirequired{
"data": {
"branchId": "string",
"connections": [
{
"createdAt": "2026-06-09T00:00:00Z",
"database": {
"id": "string",
"name": "string",
"url": "https://example.com"
},
"directConnection": {
"host": "string",
"pass": "string",
"user": "string"
},
"endpoints": {
"accelerate": {
"host": "string",
"port": 0
},
"direct": {
"host": "string",
"port": 0
},
"pooled": {
"host": "string",
"port": 0
}
},
"id": "string",
"kind": "accelerate",
"name": "string",
"type": "connection",
"url": "https://example.com"
}
],
"createdAt": "2026-06-09T00:00:00Z",
"defaultConnectionId": "string",
"id": "string",
"isDefault": true,
"logicalId": "string",
"name": "string",
"project": {
"id": "string",
"name": "string",
"url": "https://example.com"
},
"region": {
"id": "string",
"name": "string"
},
"source": {
"backupId": "string",
"databaseId": "string",
"type": "backup"
},
"status": "failure",
"type": "database",
"url": "https://example.com"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}