Databases API
Reference for the management API's region, database, lifecycle and operation endpoints, with the database and operation objects.
These endpoints list regions, create and manage databases, and report their operations. See the management API overview for authentication, the 202 model and errors.
Every endpoint can also answer 401, 403, 404, 409, 400 and 503 as described there; the ones listed under each endpoint are those specific to it.
| Method | Path | Does |
|---|---|---|
GET | /v1/regions | Lists the regions a database can be created in |
GET | /v1/databases | Lists databases |
POST | /v1/databases | Creates a database |
GET | /v1/databases/{databaseId} | Returns a database |
PATCH | /v1/databases/{databaseId} | Renames a database |
DELETE | /v1/databases/{databaseId} | Deletes a database |
POST | /v1/databases/{databaseId}/restore | Restores a deleted database |
POST | /v1/databases/{databaseId}/suspend | Suspends a database |
POST | /v1/databases/{databaseId}/resume | Resumes a database |
POST | /v1/databases/{databaseId}/retry | Retries a failed operation |
GET | /v1/databases/{databaseId}/operations | Lists a database's operations |
In every path, databaseId is the database's management ID (db_…), not the ID its cluster knows it by.
The database object
{
"id": "db_…",
"organizationId": "org_…",
"name": "production",
"slug": "production",
"parentId": null,
"reference": null,
"region": "<region-id>",
"plan": "<plan-id>",
"state": "ready",
"stateReason": null,
"limits": {
"connections": 0,
"retained": 0,
"append": 0,
"transfer": 0,
"presence": 0
},
"purgeAfter": null,
"createdAt": "2026-01-15T10:00:00.000Z",
"connection": {
"clusterUrl": "https://<cluster-host>",
"databaseId": "<cluster-database-id>",
"apiUrl": "https://<cluster-host>/v1/databases/<cluster-database-id>",
"adminUrl": "https://<cluster-host>/v1/admin/databases/<cluster-database-id>",
"websocketUrl": "wss://<cluster-host>/v1/sessions"
},
"placement": { "cellClass": "replicated", "provider": "<provider>" },
"latestOperation": null,
"deletion": null,
"readiness": "ready",
"configuration": {
"desiredRevision": 1,
"observedRevision": 1,
"observedAt": "2026-01-15T10:00:05.000Z"
}
}The numbers in limits are placeholders.
| Name | Type | Description |
|---|---|---|
id * | string | The database's management ID. |
organizationId * | string | The organization it belongs to. |
name * | string | Unique among the organization's databases that still exist, or, for a branch, among its database's branches. |
slug * | string | Derived from the name (for a branch, after its database's slug); names the database in dashboard URLs. |
parentId * | string | null | For a [branch](/docs/cloud/branches), the ID of its database; otherwise `null`. |
reference * | string | null | Your own name for the database, if you gave one when creating it. |
region * | string | The ID of its region. |
plan * | string | The ID of its plan. |
state * | "provisioning" | "ready" | "failed" | "suspended" | "pending_deletion" | "deleting" | "deleted" | See database lifecycle. |
stateReason * | string | null | Why the database is in its state, when there is something to say. |
limits * | object | The database's limits. See below. |
purgeAfter * | string | null | The same as deletion.restorableUntil; kept for earlier clients. |
createdAt * | string | When it was created. |
connection * | object | null | How applications reach it. Null until its cluster holds it and has confirmed a configuration. |
placement * | object | null | Where it runs. Null until it has been placed on a cluster. |
latestOperation * | Operation | null | Its most recent operation. |
deletion * | object | null | Where its deletion stands. Null unless it is deleted. |
readiness * | "ready" | "read_only" | "converging" | "stalled" | "unavailable" | Whether its cluster is known to enforce what its state says. |
configuration * | object | The configuration asked for and the one its cluster last confirmed. |
limits
| Name | Type | Description |
|---|---|---|
connections * | integer | Sessions open at once. |
retained * | integer | Bytes of storage, history included. |
append * | integer | Bytes written per second. |
transfer * | integer | Bytes received and sent per second. |
presence * | integer | Presence deliveries per second. |
connection
| Name | Type | Description |
|---|---|---|
clusterUrl * | string | The cluster's address. |
databaseId * | string | The ID the cluster knows the database by. |
apiUrl * | string | The database's HTTP API, for documents. |
adminUrl * | string | The database's administration, for its collections. |
websocketUrl * | string | Where sessions open. |
placement
| Name | Type | Description |
|---|---|---|
cellClass * | "replicated" | "single_node" | How the database's cluster keeps writes: across several availability zones, or on one machine. |
provider * | string | The provider the cluster runs on. |
deletion
| Name | Type | Description |
|---|---|---|
phase * | "blocking" | "grace" | "restoring" | "removing" | "purging" | "held" | The step the deletion is on. See database lifecycle. |
restorableUntil * | string | null | Until when the database can be restored. Set in the grace phase only. |
liveRemovedAt * | string | null | When its cluster removed it. Set from the purging phase on. |
heldUntil * | string | null | Until when backups hold a removed database. Set in the held phase only. |
configuration
| Name | Type | Description |
|---|---|---|
desiredRevision * | integer | Incremented whenever the database's access or limits change. |
observedRevision * | integer | null | The revision its cluster last confirmed. Null before the first confirmation. |
observedAt * | string | null | When that confirmation was recorded. |
The operation object
| Name | Type | Description |
|---|---|---|
id * | string | The operation's ID. |
databaseId * | string | The database it runs on. |
kind * | "create_database" | "delete_database" | "restore_database" | "suspend_database" | "resume_database" | "rotate_database_key" | "restore_backup" | What it does. |
state * | "pending" | "running" | "succeeded" | "failed" | "cancelled" | How far it got. |
step * | string | null | What it is doing, in words. For display. |
error * | string | null | Why it failed. |
createdAt * | string | When it was requested. |
updatedAt * | string | When it last changed. |
completedAt * | string | null | When it finished. Null while it is in progress. |
List regions
GET /v1/regionsReturns the regions in which the key's organization can create a database right now, as an array. The array is empty when no region can take one.
| Name | Type | Description |
|---|---|---|
id * | string | The value to send as region. |
label * | string | The region's name, for display. |
curl "$MIMIC_MANAGEMENT_API/v1/regions" \
-H "Authorization: Bearer $MIMIC_API_KEY"List databases
GET /v1/databasesReturns the organization's databases as an array of database objects, oldest first. Databases whose deletion is complete are not included; ones that are deleted and not yet gone are.
A key scoped to one database gets an array with only that database.
Create a database
POST /v1/databases| Name | Type | Description |
|---|---|---|
name * | string | 1 to 64 characters, trimmed. Unique among the organization's databases, or, for a branch, among its database's branches; a branch is never named `main`. |
region | string | A region ID from GET /v1/regions. Required for a database; a branch is in its database's region, and may name only that one. |
parent | string | Makes a [branch](/docs/cloud/branches) of this database (its `db_…` ID): a database of its own, created empty in that database's region. A branch is never made of another branch. |
organizationId | string | The key's organization, checked: another organization's answers `404`, and nothing is made. |
reference | string | Your own name for the database, drawn before you create it: 1 to 128 letters, digits and `._:-`. At most one of the organization's databases that still exist holds it. |
Answers 202 with the database in the provisioning state. Poll it until it is ready.
A deployment tool gives each database a reference so a create whose answer was lost is found: list the databases and look for it. A create under a reference another database holds is refused 409, naming that database.
curl -X POST "$MIMIC_MANAGEMENT_API/v1/databases" \
-H "Authorization: Bearer $MIMIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "staging", "region": "<region-id>"}'| Status | When |
|---|---|
400 | The region is not one the organization can create a database in. The message lists the ones it can. Or parent is a branch, or another region than the parent's is named |
403 | The key has the member role, or is scoped to one database |
404 | organizationId is not the key's organization, or parent names no database of it |
409 | The name or the reference is taken, the plan's maximum number of databases (or of the parent's branches) is reached, or the parent is being deleted |
Get a database
GET /v1/databases/{databaseId}Returns the database object. Answers 404 once the database's deletion is complete.
Rename a database
PATCH /v1/databases/{databaseId}| Name | Type | Description |
|---|---|---|
name * | string | The new name: 1 to 64 characters, trimmed. Unique among the organization's databases, or, for a branch, among its database's branches; a branch is never named `main`. |
Answers 200 with the database. Its slug changes with the name. Its id, connection and keys do not.
Renaming is immediate and is not an operation. Sending the name the database already has succeeds and changes nothing.
| Status | When |
|---|---|
409 | Another database of the organization has the name, or the database's state is deleting |
Delete a database
DELETE /v1/databases/{databaseId}Answers 202 with the database in the pending_deletion state. Access is blocked first; once that is confirmed, deletion.phase becomes grace and deletion.restorableUntil gives the time until which the database can be restored.
A ready, suspended or failed database can be deleted.
| Status | When |
|---|---|
409 | The database is already deleted, is provisioning, has an operation in progress, or has branches that are not being deleted |
Restore a deleted database
POST /v1/databases/{databaseId}/restoreCancels a deletion during its grace period. Takes no body. Answers 202; the database returns to the state it had before it was deleted.
This restores the database itself. To restore a backup into a new database, see the backups API.
| Status | When |
|---|---|
409 | The database is not pending_deletion, its grace period is over, or the deletion is still blocking access. In the last case, try again in a moment |
Suspend a database
POST /v1/databases/{databaseId}/suspendMakes a ready database read-only. Takes no body. Answers 202; the database becomes suspended once its cluster has confirmed it.
| Status | When |
|---|---|
409 | The database is not ready, or has an operation in progress |
Resume a database
POST /v1/databases/{databaseId}/resumeLets clients write to a suspended database again. Takes no body. Answers 202; the database becomes ready once its cluster has confirmed it.
| Status | When |
|---|---|
409 | The database is not suspended, or has an operation in progress |
Retry a failed operation
POST /v1/databases/{databaseId}/retryRuns the database's latest operation again if it failed. Takes no body. Answers 202 with the database. The retry is a new operation of the same kind and continues where the failed one stopped.
| Status | When |
|---|---|
409 | The latest operation did not fail, or it is a failed restore_backup, which is not retried: delete the database and restore the backup again |
List operations
GET /v1/databases/{databaseId}/operationsReturns the database's 50 most recent operations as an array of operation objects, newest first.
curl "$MIMIC_MANAGEMENT_API/v1/databases/$DATABASE_ID/operations" \
-H "Authorization: Bearer $MIMIC_API_KEY"