Send an invite email to a new member using the Stytch B2B API
invited until they successfully authenticate.
Sending invites to pending Members will update their status to invited. Sending invites to already active Members will return an error.
The magic link invite will be valid and can be authenticated for 1 week, after which the Member will need to to be sent a new invite email.
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
A Stytch session that can be used to run the request with the given member's permissions.
A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions.
Request type
Globally unique UUID that identifies a specific Organization. The organization_id is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience.
The email address of the Member.
The URL that the Member clicks from the invite Email Magic Link. This URL should be an endpoint in the backend server that verifies
the request by querying Stytch's authenticate endpoint and finishes the invite flow. If this value is not passed, the default invite_redirect_url
that you set in your Dashboard is used. If you have not set a default invite_redirect_url, an error is returned.
The member_id of the Member who sends the invite.
The name of the Member.
An arbitrary JSON object for storing application-specific data or identity-provider-specific data.
An arbitrary JSON object of application-specific data. These fields can be edited directly by the frontend SDK, and should not be used to store critical information. See the Metadata resource for complete field behavior details.
Use a custom template for invite emails. By default, it will use your default email template. Templates can be added in the Stytch dashboard using our built-in customization options or custom HTML templates with type “Magic Links - Invite”.
Used to determine which language to use when sending the user this delivery method. Parameter is an IETF BCP 47 language tag, e.g. "en".
Currently supported languages are English ("en"), Spanish ("es"), French ("fr") and Brazilian Portuguese ("pt-br"); if no value is provided, the copy defaults to English.
Request support for additional languages here!
en, es, pt-br, fr Roles to explicitly assign to this Member. See the RBAC guide for more information about role assignment.
The expiration time, in minutes, for an invite email. If not accepted within this time frame, the invite will need to be resent. Defaults to 10080 (1 week) with a minimum of 5 and a maximum of 10080.
x >= 0Successful response
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
Globally unique UUID that identifies a specific Member.
The Member object
The Organization object.
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.