users_users_create
Create an end user of this product with at least one identifier (email).
Create an end user of this product with at least one identifier (email). Optionally store a password HASH — this toolkit never accepts a plaintext password, and nothing verifies the credential until auth flows land in Phase 2. Only one VERIFIED copy of an email may exist per product; unverified duplicates are allowed.
Behavior
- HTTP
POST /users/users
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | — | The user's display name. |
| imageUrl | string | — | URL of the user's avatar image. |
| password | object | — | Optional credential to store for this user. Hashes only — this toolkit never accepts a plaintext password. Nothing verifies it until Phase 2. |
| testUser | boolean | — | Create this user as a TEST FIXTURE: excluded from metering (it never counts toward retained-users), hidden from the default users_users_list view, never really emailed, and — when the deployment configures one — able to sign in with the fixed magic OTP. REFUSED unless this product has test mode enabled, which a production deployment cannot do. There is no way to set or clear this later. Default false. |
| waitlisted | boolean | — | Create the user as a waitlist signup: no way in until promoted. Default false. |
| identifiers | array | • | The email addresses that reach this user. At least one is required. |
| requiresReset | boolean | — | Force a password reset before the user can sign in (use for unverifiable imported hashes). Default false. |
| publicMetadata | object | — | Metadata the end user may READ and that may flow into the JWT. Management-plane write only. |
| unsafeMetadata | object | — | Metadata the end user may WRITE in a later phase. Never trust it for authorization. |
| privateMetadata | object | — | Metadata visible to the management plane only. Never exposed to the end user. |
Response
| Field | Type | Always | Description |
|---|---|---|---|
| id | string | • | |
| name | string | • | |
| bannedAt | string | • | |
| erasedAt | string | • | |
| imageUrl | string | • | |
| testUser | boolean | • | |
| createdAt | string | • | |
| deletedAt | string | • | |
| productId | string | • | |
| updatedAt | string | • | |
| waitlisted | boolean | • | |
| identifiers | array | • | |
| lockedUntil | string | • | |
| lastSignInAt | string | • | |
| requiresReset | boolean | • | |
| publicMetadata | object | • | |
| unsafeMetadata | object | • | |
| privateMetadata | object | • | |
| emailChangeLockedUntil | string | • |
Try it
Create an end user of this product with at least one identifier (email).