Skip to main content
A Member represents an individual user within an organization. Members are uniquely identified by their email address within each organization and can have different roles, authentication factors, and metadata.

Member management

1

Create a member

Create a new member using the Create Member endpoint:
curl --request POST \
  --url https://test.stytch.com/v1/b2b/organizations/organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931/members \
  --header 'Content-Type: application/json' \
  --user 'PROJECT_ID:SECRET' \
  --data '{
    "email_address": "user@acme.com",
    "name": "Jane Doe",
    "create_member_as_pending": false
  }'
Response:
{
  "status_code": 201,
  "member": {
    "member_id": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f",
    "organization_id": "organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931",
    "email_address": "user@acme.com",
    "name": "Jane Doe",
    "status": "active",
    "trusted_metadata": {},
    "untrusted_metadata": {}
  }
}
2

Update member details

Update member information using the Update Member endpoint:
curl --request PUT \
  --url https://test.stytch.com/v1/b2b/organizations/organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931/members/member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f \
  --header 'Content-Type: application/json' \
  --user 'PROJECT_ID:SECRET' \
  --data '{
    "name": "Jane Smith",
    "trusted_metadata": {
      "role": "admin",
      "department": "Engineering"
    }
  }'
3

Search members

Find members by email, name, or status using the Search Members endpoint:
curl --request POST \
  --url https://test.stytch.com/v1/b2b/organizations/members/search \
  --header 'Content-Type: application/json' \
  --user 'PROJECT_ID:SECRET' \
  --data '{
    "organization_ids": ["organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931"],
    "query": {
      "operator": "AND",
      "operands": [
        {
          "filter_name": "status",
          "filter_value": ["active"]
        }
      ]
    }
  }'

Member status

A member’s status determines how they interact with your application:
Members become active after successfully authenticating at least once. Active members can log in and access the application.When using email authentication, active members receive login emails that route to login_redirect_url.

Member metadata

Members support two types of metadata for storing application-specific data:
Secure metadata that can only be modified by backend integrations:
curl --request PUT \
  --url https://test.stytch.com/v1/b2b/organizations/organization-test-.../members/member-test-... \
  --header 'Content-Type: application/json' \
  --user 'PROJECT_ID:SECRET' \
  --data '{
    "trusted_metadata": {
      "role": "admin",
      "billing_status": "paid",
      "stripe_customer_id": "cus_123456"
    }
  }'
Access:
  • Backend: Read and write
  • Frontend: Read only
Store sensitive fields like roles, permissions, or billing information in trusted metadata.
Metadata constraints:
  • Maximum 20 top-level keys per metadata object
  • Cannot exceed 4KB in size per metadata object
Do not store sensitive information (passport numbers, credit card details, etc.) in metadata.
See Metadata Update Behavior for how updates are merged.

Learn more