How do you update details of secondary linked accounts?

We have users who have multiple accounts linked (SMS passwordless, email passwordless, username/password, etc).

We have an admin UI which will allow admin users to update the mobile number of a user.

Using the ManagementAPi, I can see I can easily update the mobile number of a SMS passwordless account if it is a primary account, but how do I do this when it is a secondary account?

I did try constructing a userId myself for the secondary account to see if I could use that to do the update, but it says user not found.

Is my only option to un-link the SMS passwordless account first, update it and then re-link it?

Regards,
George.

1 Like

I’d also like an answer to this question

Hi all, has this one been solved?

I ended up having to unlink the accounts, update each as required, and then relink them again

2 Likes

Thanks for sharing that with the rest of community!

Hi folks, here is an update.

You can update a linked user’s data via the management API update user endpoint by passing the linked connection parameter in the body of the request.

For example:

 curl --location --request PATCH 'https://{DOMAIN}/api/v2/users/{PRIMARY_IDENTITY_ID}' \ 
 --header 'Authorization: Bearer ' \ 
 --header 'Content-Type: application/json' \ 
 --data-raw '{ "phone_number":"{NEW_PHONE_NUMBER}" "connection": "sms" }'

Hope that helps!