Replace (upsert) an identity (social identity) for the user. Creates the identity if absent, replaces it otherwise. Idempotent. Unlike POST, this allows replacing an existing identity for the same social target. When replacing with a different social user ID, previously stored third-party tokens for the old identity are cleared. A logto-verification-id header is required when the user has at least one security verification method: password, primary email, or primary phone. The header can be omitted only when the user has none of these methods. A verification record for the new social identity is always required.
PUT
/api/my-account/identities
curl \
--request PUT 'https://[tenant_id].logto.app/api/my-account/identities' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"newIdentifierVerificationRecordId":"string"}'
Request examples
{
"newIdentifierVerificationRecordId": "string"
}