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.

MethodPathDoes
GET/v1/regionsLists the regions a database can be created in
GET/v1/databasesLists databases
POST/v1/databasesCreates 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}/restoreRestores a deleted database
POST/v1/databases/{databaseId}/suspendSuspends a database
POST/v1/databases/{databaseId}/resumeResumes a database
POST/v1/databases/{databaseId}/retryRetries a failed operation
GET/v1/databases/{databaseId}/operationsLists 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.

NameTypeDescription
id *stringThe database's management ID.
organizationId *stringThe organization it belongs to.
name *stringUnique among the organization's databases that still exist, or, for a branch, among its database's branches.
slug *stringDerived from the name (for a branch, after its database's slug); names the database in dashboard URLs.
parentId *string | nullFor a [branch](/docs/cloud/branches), the ID of its database; otherwise `null`.
reference *string | nullYour own name for the database, if you gave one when creating it.
region *stringThe ID of its region.
plan *stringThe ID of its plan.
state *"provisioning" | "ready" | "failed" | "suspended" | "pending_deletion" | "deleting" | "deleted"See database lifecycle.
stateReason *string | nullWhy the database is in its state, when there is something to say.
limits *objectThe database's limits. See below.
purgeAfter *string | nullThe same as deletion.restorableUntil; kept for earlier clients.
createdAt *stringWhen it was created.
connection *object | nullHow applications reach it. Null until its cluster holds it and has confirmed a configuration.
placement *object | nullWhere it runs. Null until it has been placed on a cluster.
latestOperation *Operation | nullIts most recent operation.
deletion *object | nullWhere 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 *objectThe configuration asked for and the one its cluster last confirmed.

limits

NameTypeDescription
connections *integerSessions open at once.
retained *integerBytes of storage, history included.
append *integerBytes written per second.
transfer *integerBytes received and sent per second.
presence *integerPresence deliveries per second.

connection

NameTypeDescription
clusterUrl *stringThe cluster's address.
databaseId *stringThe ID the cluster knows the database by.
apiUrl *stringThe database's HTTP API, for documents.
adminUrl *stringThe database's administration, for its collections.
websocketUrl *stringWhere sessions open.

placement

NameTypeDescription
cellClass *"replicated" | "single_node"How the database's cluster keeps writes: across several availability zones, or on one machine.
provider *stringThe provider the cluster runs on.

deletion

NameTypeDescription
phase *"blocking" | "grace" | "restoring" | "removing" | "purging" | "held"The step the deletion is on. See database lifecycle.
restorableUntil *string | nullUntil when the database can be restored. Set in the grace phase only.
liveRemovedAt *string | nullWhen its cluster removed it. Set from the purging phase on.
heldUntil *string | nullUntil when backups hold a removed database. Set in the held phase only.

configuration

NameTypeDescription
desiredRevision *integerIncremented whenever the database's access or limits change.
observedRevision *integer | nullThe revision its cluster last confirmed. Null before the first confirmation.
observedAt *string | nullWhen that confirmation was recorded.

The operation object

NameTypeDescription
id *stringThe operation's ID.
databaseId *stringThe 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 | nullWhat it is doing, in words. For display.
error *string | nullWhy it failed.
createdAt *stringWhen it was requested.
updatedAt *stringWhen it last changed.
completedAt *string | nullWhen it finished. Null while it is in progress.

List regions

GET /v1/regions

Returns 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.

NameTypeDescription
id *stringThe value to send as region.
label *stringThe region's name, for display.
curl "$MIMIC_MANAGEMENT_API/v1/regions" \
  -H "Authorization: Bearer $MIMIC_API_KEY"

List databases

GET /v1/databases

Returns 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
NameTypeDescription
name *string1 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`.
regionstringA region ID from GET /v1/regions. Required for a database; a branch is in its database's region, and may name only that one.
parentstringMakes 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.
organizationIdstringThe key's organization, checked: another organization's answers `404`, and nothing is made.
referencestringYour 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>"}'
StatusWhen
400The 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
403The key has the member role, or is scoped to one database
404organizationId is not the key's organization, or parent names no database of it
409The 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}
NameTypeDescription
name *stringThe 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.

StatusWhen
409Another 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.

StatusWhen
409The 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}/restore

Cancels 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.

StatusWhen
409The 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}/suspend

Makes a ready database read-only. Takes no body. Answers 202; the database becomes suspended once its cluster has confirmed it.

StatusWhen
409The database is not ready, or has an operation in progress

Resume a database

POST /v1/databases/{databaseId}/resume

Lets clients write to a suspended database again. Takes no body. Answers 202; the database becomes ready once its cluster has confirmed it.

StatusWhen
409The database is not suspended, or has an operation in progress

Retry a failed operation

POST /v1/databases/{databaseId}/retry

Runs 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.

StatusWhen
409The 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}/operations

Returns 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"