List all possible organization relationships connected to a Member Session or Intermediate Session.
active_member, pending_member, or invited_member will be returned, and any membership can be assumed by calling the Exchange Session endpoint.
When an Intermediate Session is passed in, all relationship types (active_member, pending_member, invited_member, eligible_to_join_by_email_domain, and eligible_to_join_by_oauth_tenant) will be returned, and any membership can be assumed by calling the Exchange Intermediate Session endpoint.
This endpoint requires either an intermediate_session_token, session_jwt or session_token be included in the request. It will return an error if multiple are present.
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Request type
The Intermediate Session Token. This token does not necessarily belong to a specific instance of a Member, but represents a bag of factors that may be converted to a member session. The token can be used with the OTP SMS Authenticate endpoint, TOTP Authenticate endpoint, or Recovery Codes Recover endpoint to complete an MFA flow and log in to the Organization. The token has a default expiry of 10 minutes. It can also be used with the Exchange Intermediate Session endpoint to join a specific Organization that allows the factors represented by the intermediate session token; or the Create Organization via Discovery endpoint to create a new Organization and Member. Intermediate Session Tokens have a default expiry of 10 minutes.
A secret token for a given Stytch Session.
The JSON Web Token (JWT) for a given Stytch Session.
Successful 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.
The email address.
An array of discovered_organization objects tied to the intermediate_session_token, session_token, or session_jwt. See the Discovered Organization Object for complete details.
Note that Organizations will only appear here under any of the following conditions:
The end user is already a Member of the Organization.
The end user is invited to the Organization.
The end user can join the Organization because:
a) The Organization allows JIT provisioning.
b) The Organizations' allowed domains list contains the Member's email domain.
c) The Organization has at least one other Member with a verified email address with the same domain as the end user (to prevent phishing attacks).
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.
If the intermediate session token is associated with a specific Organization, that Organization ID will be returned here. The Organization ID will be null if the intermediate session token was generated by a email magic link discovery or OAuth discovery flow. If a session token or session JWT is provided, the Organization ID hint will be null.