Skip to content

Create a user (super admin only)

POST
/admin/users
curl --request POST \
--url https://example.com/api/admin/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "hello@example.com", "password": "example", "system_role": "user" }'
Media type application/json
object
email
required
string format: email
password

When omitted, Supabase sends an invite email.

string
>= 8 characters <= 128 characters
system_role
string
default: user
Allowed values: user superadmin

User created

Media type application/json
object
ok
required
boolean
user
required
object
id
required
string format: uuid
email
string format: email
created_at
required
string format: date-time
system_role
required
string
Allowed values: user superadmin

Not authenticated

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number
reconnect

True if re-linking GitHub may fix the issue

boolean

Forbidden

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number