Elysia Enterprise API
  1. Better Auth
Elysia Enterprise API
  • Health
    • Health check
    • Detailed health stats
  • I18n
    • Test i18n
    • Test i18n params
    • Change language
    • Type safety
  • Cache
    • Cache health check
    • Cache metrics
    • Clear cache
    • Test cache operations
  • Better Auth
    • socialSignIn
      POST
    • /api/auth/get-session
      GET
    • /api/auth/sign-out
      POST
    • /api/auth/sign-up/email
      POST
    • /api/auth/sign-in/email
      POST
    • /api/auth/forget-password
      POST
    • /api/auth/reset-password
      POST
    • /api/auth/verify-email
      GET
    • /api/auth/send-verification-email
      POST
    • /api/auth/change-email
      POST
    • /api/auth/change-password
      POST
    • /api/auth/update-user
      POST
    • /api/auth/delete-user
      POST
    • /api/auth/reset-password/{token}
      GET
    • /api/auth/request-password-reset
      POST
    • /api/auth/list-sessions
      GET
    • /api/auth/revoke-session
      POST
    • /api/auth/revoke-sessions
      POST
    • /api/auth/revoke-other-sessions
      POST
    • /api/auth/link-social
      POST
    • /api/auth/list-accounts
      GET
    • /api/auth/delete-user/callback
      GET
    • /api/auth/unlink-account
      POST
    • /api/auth/refresh-token
      POST
    • /api/auth/get-access-token
      POST
    • /api/auth/account-info
      POST
    • /api/auth/ok
      GET
    • /api/auth/error
      GET
    • /api/auth/two-factor/get-totp-uri
      POST
    • /api/auth/two-factor/verify-totp
      POST
    • /api/auth/two-factor/send-otp
      POST
    • /api/auth/two-factor/verify-otp
      POST
    • /api/auth/two-factor/verify-backup-code
      POST
    • /api/auth/two-factor/generate-backup-codes
      POST
    • /api/auth/two-factor/enable
      POST
    • /api/auth/two-factor/disable
      POST
    • /api/auth/one-tap/callback
      POST
    • /api/auth/sign-in/phone-number
      POST
    • /api/auth/phone-number/send-otp
      POST
    • /api/auth/phone-number/verify
      POST
    • /api/auth/phone-number/forget-password
      POST
    • /api/auth/phone-number/request-password-reset
      POST
    • /api/auth/phone-number/reset-password
      POST
    • setRole
      POST
    • createUser
      POST
    • updateUser
      POST
    • listUsers
      GET
    • listUserSessions
      POST
    • unbanUser
      POST
    • banUser
      POST
    • impersonateUser
      POST
    • /api/auth/admin/stop-impersonating
      POST
    • revokeUserSession
      POST
    • revokeUserSessions
      POST
    • removeUser
      POST
    • setUserPassword
      POST
    • /api/auth/admin/has-permission
      POST
    • /api/auth/organization/create
      POST
    • /api/auth/organization/update
      POST
    • /api/auth/organization/delete
      POST
    • /api/auth/organization/set-active
      POST
    • /api/auth/organization/get-full-organization
      GET
    • /api/auth/organization/list
      GET
    • /api/auth/organization/invite-member
      POST
    • /api/auth/organization/cancel-invitation
      POST
    • /api/auth/organization/accept-invitation
      POST
    • /api/auth/organization/get-invitation
      GET
    • /api/auth/organization/reject-invitation
      POST
    • /api/auth/organization/list-invitations
      GET
    • /api/auth/organization/get-active-member
      GET
    • /api/auth/organization/check-slug
      POST
    • /api/auth/organization/remove-member
      POST
    • /api/auth/organization/update-member-role
      POST
    • /api/auth/organization/leave
      POST
    • /api/auth/organization/list-user-invitations
      GET
    • /api/auth/organization/list-members
      GET
    • /api/auth/organization/has-permission
      POST
  • Schemas
    • Schemas
      • User
      • Session
      • Account
      • Verification
      • TwoFactor
      • Organization
      • Member
      • Invitation
  1. Better Auth

createUser

POST
/api/auth/admin/create-user
Create a new user

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/json

Examples

Responses

🟢200OK
application/json
User created
Body

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
🟠429429
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/auth/admin/create-user' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "string",
    "password": "string",
    "name": "string",
    "role": "string",
    "data": "string"
}'
Response Response Example
200 - Example 1
{
    "user": {
        "id": "string",
        "name": "string",
        "email": "string",
        "emailVerified": "Generated at runtime",
        "image": "string",
        "createdAt": "Generated at runtime",
        "updatedAt": "Generated at runtime",
        "twoFactorEnabled": false,
        "phoneNumber": "string",
        "phoneNumberVerified": true,
        "role": "string",
        "banned": false,
        "banReason": "string",
        "banExpires": "string"
    }
}
Modified at 2025-09-02 02:31:01
Previous
setRole
Next
updateUser
Built with