> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revoengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# api.createDatabase()

> Public low-code contract, signatures and examples for api.createDatabase.

## `api.createDatabase()`

Creates a logical database through durable Database Operations and waits for verified DDL commit.
Accepted work survives a disconnected caller. Standard index builds can block writes.
The server assigns databaseId, version, and timestamps;
never generate or send those values. A normal database needs at least one definition.

Notes:

* Unavailable with `readOnly: true` (throws an error).

### Signature

```ts theme={null}
static createDatabase(data: DatabaseCreateInput): Promise<Database>;
```

### Example

```ts theme={null}
await api.createDatabase({
  name: 'audit_log',
  category: 'Ops',
  desc: 'Audit',
  restricted: false,
  groups: [],
  users: [],
  definition: [{
    name: 'auditId', type: 'UUID',
    isPrimaryKey: true, isArray: false, isUnique: true,
    isNullable: false, isIndex: true, foreignReferences: [],
  }],
});
```

See [all api methods](https://docs.revoengine.com/low-code/reference/api.md) or [runtime basics](https://docs.revoengine.com/low-code/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.