Skip to main content
POST
Create a database user
Required permission: database_user.create

Authorizations

Authorization
string
header
required

The Bearer Token generated on the Cloud UI.

Path Parameters

database
string | null
required

The database identifier

Body

application/json
username
string
required

The username. It must start with a lowercase letter or underscore, and may only contain lowercase letters, numbers, and underscores. It must have at least 3 characters, and at most 32 on MySQL clusters or 63 on Postgres clusters. It must be unique across the cluster.

Example:

"app_tenant_1"

type
enum<string>
required

Whether the user may read and write data, or only read it.

Available options:
read_write,
read_only
databases
string[]
required

The identifiers of the databases in this cluster that the user may access. Pass an empty array to grant access to none.

Response

DatabaseUserResource

data
DatabaseUserResource · object
required
included
(DatabaseResource · object | DatabaseSchemaResource · object)[]