External IDs for members
When a member is created in Stytch, they will be assigned a unique identifier that looks like a UUID. For your convenience, you may choose to additionally assign an "external ID" to a member which can then be used in any place where the Stytch member_id is expected.
Assigning an external ID at creation
When calling the Create Member endpoint, you may pass in an optional external_id parameter. The external_id is a string consisting of alphanumeric, ., _, or - characters with a maximum length of 128 characters. External IDs must be unique across members in a given organization, but may be reused across different organizations in the same project.
You may also set an external ID during a call to the Migrate Password endpoint, but only if the member does not yet exist and is created. If the member already exists, you must use the Update Member endpoint to assign or reassign the external_id.
Assigning an external ID later
If a member has already been created, you may assign it an external_id later with the Update Member endpoint. Similar to creation, pass in an external_id parameter and it will then be assigned to that member. Again, remember that external IDs must be unique within a given organization, but may be reused across different organizations in the same project.
Updating a member's external ID
If you wish to change a member's external ID, you may use the same Update Member endpoint listed above. After this point, you will no longer be able to refer to that member by its old external_id.
Using external IDs
In any endpoint that expects a member_id, you may instead choose to pass in your custom-defined external_id. For clarity, all responses from Stytch will continue to use the Stytch-defined member_id, though external_id will exist as a subfield within the Member object.
Using organization slugs instead of organization IDs
Along with the feature to use external IDs instead of member IDs in the Stytch API, you may also use organization slugs in place of organization IDs. All the existing rules related to setting and changing organization slugs still exist, but this is another feature for those who prefer to use human-readable identifiers instead of generated UUIDs.