跳转到主要内容
POST
POST /admin/api/users

授权

gproxy_session
string
cookie
必填

请求头

x-gproxy-admin-scope
string

Administrative scope selected by the caller.

请求体

application/json
name
string
必填
enabled
boolean | null
id
string | null
oauthClientAllowlist
string[] | null
password
string | null

Optional: a user created without one cannot sign in until a password is set, which is what an API-key-only account is.

role
string | null

admin or user; absent means user.

响应

Success

createdAtMs
integer<int64>
必填
enabled
boolean
必填
hasPassword
boolean
必填

Whether a console/portal password is set. password_hash itself has no field here and no accessor anywhere.

id
string
必填
name
string
必填
oauthClientAllowlist
string[] | null
必填

None inherits the levels above; an empty list denies every client for this user.

role
string
必填

Instance-wide role, admin or user. Organization and team roles are memberships and are not this.