This documentation provides a reference to the acceptInviteWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow accepts an invite and creates a user. It's used by the Accept Invite Admin API Route.
The workflow throws an error if the specified token is not valid. Also, the workflow requires an auth identity to be created previously. You can create an auth identity using the Retrieve Registration JWT Token API Route.
You can use this workflow within your customizations or your own custom workflows, allowing you to accept invites within your custom flows.
Source CodeWorkflow hook
Step conditioned by when
View step details
AcceptInviteWorkflowInputDTO
AcceptInviteWorkflowInputDTOinvite_token
stringauth_identity_id
stringuser
objectUserDTO[]
UserDTO[]id
stringemail
stringfirst_name
null | stringlast_name
null | stringavatar_url
null | stringmetadata
null | Record<string, unknown>created_at
Dateupdated_at
Datedeleted_at
null | DateThis section lists the events that are either triggered by the emitEventStep
in the workflow, or by another workflow executed within this workflow.
You can listen to these events in a subscriber, as explained in the Subscribers documentation.
Event | Description | Payload | Action |
---|---|---|---|
| Emitted when users are created. |
| |
| Emitted when an invite is accepted. |
|