Sleep the database in memory, keeping its storage, host and credentials and wait a bounded time for it to finish.
curl -X POST "https://api.nevia.cloud/v1/databases/01d4cnjkgq02b6tfqvy8yh391pq/sleep" \
-H "Authorization: Bearer $TOKEN"{
"database": {
"id": "01d4cnjkgq02b6tfqvy8yh391pq",
"workspace": "01d4cnjjq40hnnh0nwmkg35nv2h",
"project": null,
"name": "api-staging",
"state": "ready",
"pending": null,
"engine": "postgres",
"version": "18.6",
"host": "01d4cnjkgq02b6tfqvy8yh391pq.live.nevia.cloud",
"port": 5432,
"parent": null,
"from_checkpoint": "01d4cnjkwhftngfp8vkmp723mhv",
"generation": 1,
"protected": false,
"error": null,
"created_at": "2026-09-10T12:34:56Z",
"deleted_at": "2026-09-10T12:34:56Z"
},
"operations": [
"01d4cnjm89yk0r3xtv80dy0x7by"
]
}Authorization
bearerAuth Send the token in the Authorization: Bearer <token> header. See Authenticate.
In: header
Path Parameters
Database id: 27 lowercase letters and digits.
^[A-Za-z0-9_-]{1,64}$Behavior
Completion returns 200 with the database sleeping. If the wait runs out, 202 carries pending: sleeping and a database.sleep operation. Repeating the request while that operation runs returns 202 with the same operation. A sleeping database with no pending transition returns 200 unchanged.
Open connections close. New connections fail at the TLS handshake until the database wakes.
Response
application/jsonThe database, sleeping.