- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
createUserAccountWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the createUserAccountWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates a user and attaches it to an auth identity.
You can create an auth identity first using the Retrieve Registration JWT Token API Route. Learn more about basic authentication flows in this documentation.
You can use this workflow within your customizations or your own custom workflows, allowing you to register or create user accounts within your custom flows.
Source CodeExamples#
Steps#
Input#
CreateUserAccountWorkflowInput
CreateUserAccountWorkflowInputThe details of the user account to create.
CreateUserAccountWorkflowInput
CreateUserAccountWorkflowInputauthIdentityId
stringThe ID of the auth identity to attach the user to.
authIdentityId
stringuserData
CreateUserDTOThe details of the user to create.
userData
CreateUserDTOOutput#
UserDTO
UserDTOThe user details.
UserDTO
UserDTOid
stringThe ID of the user.
id
stringemail
stringThe email of the user.
email
stringfirst_name
null | stringThe first name of the user.
first_name
null | stringlast_name
null | stringThe last name of the user.
last_name
null | stringavatar_url
null | stringThe avatar URL of the user.
avatar_url
null | stringmetadata
null | Record<string, unknown>Holds custom data in key-value pairs.
metadata
null | Record<string, unknown>created_at
DateThe creation date of the user.
created_at
Dateupdated_at
DateThe updated date of the user.
updated_at
Datedeleted_at
null | DateThe deletion date of the user.
deleted_at
null | DateWas this page helpful?