Organizations

Creates a Member. An organization_id and email_address are required.

post/v1/b2b/organizations/{organization_id}/members

Request

  • Base URL
    https://api.stytch.com
  • Auth
    HTTP basic

Path parameters

organization_idstring required

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.

Headers

X-Stytch-Member-Sessionstring

A Stytch session that can be used to run the request with the given member's permissions.

X-Stytch-Member-SessionJWTstring

A Stytch Session JSON Web Token (JWT) that can be used to run the request with the given member's permissions.

Request body

email_addressstring required

The email address of the Member.

namestring

The name of the Member.

trusted_metadataobject

An arbitrary JSON object for storing application-specific data or identity-provider-specific data.

untrusted_metadataobject

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.

create_member_as_pendingboolean

Flag for whether or not to save a Member as pending or active in Stytch. It defaults to false. If true, new Members will be created with status pending in Stytch's backend. Their status will remain pending and they will continue to receive signup email templates for every Email Magic Link until that Member authenticates and becomes active. If false, new Members will be created with status active.

is_breakglassboolean

Identifies the Member as a break glass user - someone who has permissions to authenticate into an Organization by bypassing the Organization's settings. A break glass account is typically used for emergency purposes to gain access outside of normal authentication procedures. Refer to the Organization object and its auth_methods and allowed_auth_methods fields for more details.

mfa_phone_numberstring

The Member's phone number. A Member may only have one phone number. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX).

mfa_enrolledboolean

Sets whether the Member is enrolled in MFA. If true, the Member must complete an MFA step whenever they wish to log in to their Organization. If false, the Member only needs to complete an MFA step if the Organization's MFA policy is set to REQUIRED_FOR_ALL.

rolesstring[]

Roles to explicitly assign to this Member. See the RBAC guide for more information about role assignment.

external_idstring

An identifier that can be used in most API calls where a member_id is expected. This is a string consisting of alphanumeric, ., _, -, or | characters with a maximum length of 128 characters. External IDs must be unique within an organization, but may be reused across different organizations in the same project.

Response

Successful response

request_idstring required

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.

member_idstring required

Globally unique UUID that identifies a specific Member.

status_codeinteger required

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.

Changes