The upstream subject itself moved
const url = 'https://your-tenant-host/v1/id/upstream/change-subject';const options = { method: 'POST', headers: { 'x-edgekit-site-id': 'site_example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"subject":"legacy-1001","newSubject":"legacy-1001"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-tenant-host/v1/id/upstream/change-subject \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-edgekit-site-id: site_example' \ --data '{ "subject": "legacy-1001", "newSubject": "legacy-1001" }'Push-only, because a credential asserting a new subject is indistinguishable from a new person, and sign-in would correctly treat it as one. The supported identity providers do not preserve a subject across an account merge, so this route replaces a detection nobody can implement. A retry after success is 404: the old subject is no longer bound.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”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.
Example
site_exampleThe 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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The sub the identity provider issues for this person.
Example
legacy-1001The sub the identity provider issues for this person.
Example
legacy-1001Responses
Section titled “Responses”The link now names the new subject.
object
Example
{ "success": true, "userId": "01926f3a-8b4c-7d2e-9f10-2a3b4c5d6e7f", "applied": true}Invalid request.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Missing or invalid credential.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Not allowed.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Resource not found.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Conflicts with an existing record.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Request validation failed.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Unexpected error.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}With Retry-After, briefly unavailable; without it, not configured.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}