B2B Saas Authentication

/

API reference

/

Members

/

Unlink Retired Email

Unlink a Member's Retired Email

POSThttps://test.stytch.com/v1/b2b/organizations/{organization_id}/members/{member_id}/unlink_retired_email

Unlinks a retired email address from a Member specified by their organization_id and member_id. The email address to be retired can be identified in the request body by either its email_id, its email_address, or both. If using both identifiers they must refer to the same email.

A previously active email address can be marked as retired in one of two ways:

  • It's replaced with a new primary email address during an explicit Member update.

  • A new email address is surfaced by an OAuth, SAML or OIDC provider. In this case the new email address becomes the Member's primary email address and the old primary email address is retired.

A retired email address cannot be used by other Members in the same Organization. However, unlinking retired email addresses allows them to be subsequently re-used by other Organization Members. Retired email addresses can be viewed on the Member object.


Path parameters


organization_id*string

member_id*string

Body parameters


email_idstring

email_addressstring

Header parameters


X-Stytch-Member-Sessionstring

X-Stytch-Member-SessionJWTstring

Response fields


request_idstring

status_codeint

member_idstring

organization_idstring

memberobject

organizationobject
curl --request POST \
  --url https://test.stytch.com/v1/b2b/organizations/organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931/members/member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f/unlink_retired_email \
  -u 'PROJECT_ID:SECRET' \
  -H 'Content-Type: application/json' \
  -H "X-Stytch-Member-Session: mZAYn5aLEqKUlZ_Ad9U_fWr38GaAQ1oFAhT8ds245v7Q" \
  -d '{
    "email_id": "email-test-81bf03a8-86e1-4d95-bd44-bb3495224953",
    "email_address": "sandbox@stytch.com"
  }'

RESPONSE

200
{
  "status_code": 200,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "member_id": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f",
  "organization_id": "organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931",
  "member": {...},
  "organization": {...}
}