users_users_set_primary_identifier
OPERATOR OVERRIDE of a user's primary email address, for the case the normal flow cannot serve: the old address is unreachable (dead mailbox, imported user), so the user cannot approve the change themselves.
OPERATOR OVERRIDE of a user's primary email address, for the case the normal flow cannot serve: the old address is unreachable (dead mailbox, imported user), so the user cannot approve the change themselves. This does NOT swap the address now. It SCHEDULES the swap behind this product's mandatory delay (config `emailChange.overrideDelayHours`, default 72) and immediately emails the OLD address an abort link; if that mailbox is alive and its owner clicks, nothing happens. When the delay elapses the address is swapped, verified, and EVERY SESSION of that user is revoked. Every step is audited (`email_change.override_scheduled` / `_cancelled` / `_applied`) with the `reason` you pass, so do the identity proofing first and write down what it was. Use users_users_update for profile fields; this tool is only for the identity a user signs in with.
Behavior
- HTTP
POST /users/users/:userId/primary-identifier
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| string | • | The address to make primary. Must not already belong, verified, to another user of this product. | |
| reason | string | • | What identity proofing was done and under which ticket. Recorded verbatim in the audit row — this is the whole point of the tool being audited. |
| userId | string | • | The user whose primary email address is being replaced. |
Response
| Field | Type | Always | Description |
|---|---|---|---|
| requestId | string | • | |
| scheduledFor | string | • |
Try it
OPERATOR OVERRIDE of a user's primary email address, for the case the normal flow cannot serve: the old address is unreachable (dead mailbox, imported user), so the user cannot approve the change themselves.