Skip to content

The upstream changed this person's address

POST
/v1/id/upstream/change-identifier
curl --request POST \
--url https://your-tenant-host/v1/id/upstream/change-identifier \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-edgekit-site-id: site_example' \
--data '{ "subject": "legacy-1001", "email": "new@example.com", "changedAt": "2026-08-03T09:00:00.000Z", "emailVerified": true }'

Replaces verify-then-swap in the migration modes. Anything not strictly newer than the change already recorded is ignored, so a retry is safe and cannot undo a fresher observation. A collision with a live user is refused and never merged, and leaves a durable conflict record. Sessions are not revoked: lock and password reset have their own event whose effect is revocation.

x-edgekit-site-id
required

The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.

string
>= 1 characters <= 128 characters

Example

site_example

The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.

Media typeapplication/json
object
subject
required

The sub the identity provider issues for this person.

string
>= 1 characters <= 512 characters

Example

legacy-1001
email
required
string format: email

Example

new@example.com
changedAt
required

When the upstream system recorded the change.

string format: date-time

Example

2026-08-03T09:00:00.000Z
emailVerified
boolean

The address moved, or the push was older than what is held.

Media typeapplication/json
object
success
required
boolean
userId
required
string format: uuid
applied
required
boolean

Example

{
"success": true,
"userId": "01926f3a-8b4c-7d2e-9f10-2a3b4c5d6e7f",
"applied": true
}

Invalid request.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Missing or invalid credential.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Not allowed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Resource not found.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Conflicts with an existing record.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Request validation failed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Unexpected error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

With Retry-After, briefly unavailable; without it, not configured.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}