createUsersWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the createUsersWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates one or more users. It's used by other workflows, such as acceptInviteWorkflow to create a user for an invite.
You can attach an auth identity to each user to allow the user to log in using the setAuthAppMetadataStep. Learn more about auth identities in this documentation.
You can use this workflow within your customizations or your own custom workflows, allowing you to create users within your custom flows.
Source CodeExamples#
Steps#
Input#
CreateUsersWorkflowInputDTO
CreateUsersWorkflowInputDTO
CreateUsersWorkflowInputDTO
CreateUsersWorkflowInputDTOusers
CreateUserDTO[]The users to create.
users
CreateUserDTO[]Output#
UserDTO[]
UserDTO[]
UserDTO[]
UserDTO[]id
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?