Foreign keys

In many cases, Zephr Customers use a Foreign Key for a variety of integrations with Zephr. These are stored differently to User Schema Attributes, using Foreign Systems.

This guide details how to set a Foreign Key in Zephr using the Public API and, once set, how to search for users using Foreign Key or email.

To set a Foreign Key in Zephr during registration, use the following request:

curl --location --request POST '' \\
--header 'Content-Type: application/json' \\
--data-raw '{
        "identifiers": {
            "email\_address": ""
        "validators": {
            "password": "sup3rs3cr3t"
        "foreign\_keys": {
         "CRMID": "12345"

To find users based upon Foreign Key, make the following call:



To Insert a Foreign Key, use the following request. Make sure you use the zephr_admin_session=<sessionid> as a cookie as it will help determine the tenant:


The body should include the CRMID. For example, 1234.

Once the CRMID is set for that user, it can be retrieved as follows: