# Update Factor updatePhone=true flag does not work

**URL:** <https://devforum.okta.com/t/update-factor-updatephone-true-flag-does-not-work/1265>\
**Category:** Questions\
**Created:** [February 16, 2018, 4:42pm UTC](https://devforum.okta.com/t/update-factor-updatephone-true-flag-does-not-work/1265 "2018-02-16T16:42:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdavis](https://avatars.discourse-cdn.com/v4/letter/k/cdc98d/32.png) [@kdavis](https://devforum.okta.com/u/kdavis)\
**Post date:** [February 16, 2018, 4:42pm UTC](https://devforum.okta.com/t/update-factor-updatephone-true-flag-does-not-work/1265/1 "2018-02-16T16:42:11Z")

</div>

Hello,

We are trying to update a factor phone number via the factor api and it does not work. In documentation it states “If the user wants to use a different phone number (instead of the existing phone number) then the enroll API call needs to supply updatePhone option with true.”

This flag does not work and we get back a 400 stating “A factor of this type is already set up.”

```auto
curl -v -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: SSWS ${api_token}" \
-d '{
  "factorType": "sms",
  "provider": "OKTA",
  "profile": {
    "phoneNumber": "+1-555-415-1337"
  }
}' "https://dev- ****.oktapreview.com/api/v1/users/${userId}/factors?updatePhone=true"

```

Is there something I’m missing here?

---

<div class="post-metadata">

**Author:** ![tom](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/tom/32/24_2.png) [@tom](https://devforum.okta.com/u/tom)\
**Post date:** [February 20, 2018, 9:53pm UTC](https://devforum.okta.com/t/update-factor-updatephone-true-flag-does-not-work/1265/2 "2018-02-20T21:53:48Z")

</div>

[https://developer.okta.com/docs/api/resources/factors.html#existing-phone](https://developer.okta.com/docs/api/resources/factors.html#existing-phone)

I think the documentation of the parameter doesn’t convey the nuances associated with it. You can’t update the phone number when there is currently a phone that has been activated. If you need to re-enroll, you need to start from scratch by deleting the phone/sms factor.

`updatePhone` can only be used before the factor is activated.

Hope this helps, I’m going to ping the team to update the documentation.

---

<div class="post-metadata">

**Author:** ![acj](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@acj](https://devforum.okta.com/u/acj)\
**Post date:** [March 29, 2019, 10:49am UTC](https://devforum.okta.com/t/update-factor-updatephone-true-flag-does-not-work/1265/3 "2019-03-29T10:49:31Z")

</div>

This is an old thread, but the documentation does not seem to have been updated. I have the same use case where I want to update the SMS number, but only if new number is validated. Otherwise keep the existing number intact. This behavior is available in the Okta UI. But does not seem to work via the API.

---

<div class="post-metadata">

**Author:** ![raja.muppanasetti](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@raja.muppanasetti](https://devforum.okta.com/u/raja.muppanasetti)\
**Post date:** [November 21, 2019, 12:55pm UTC](https://devforum.okta.com/t/update-factor-updatephone-true-flag-does-not-work/1265/4 "2019-11-21T12:55:44Z")

</div>

I have the same requirement  
I tried the following process:

1.Get the Factors list from the user using GET FACTORS --Extract the FactorID.  
2.Delete the Existing SMS FACTOR by using DELETE FACTOR - FactorId has to be mentioned in the URL  
3.Then use the {{url}}/api/v1/authn/factors?updatePhone=true  
This process helped me in deleting the activated SMS factor and enrolling the SMS as MFA with updated mobile number.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [April 25, 2022, 5:23pm UTC](https://devforum.okta.com/t/update-factor-updatephone-true-flag-does-not-work/1265/5 "2022-04-25T17:23:56Z")

</div>

Closed on April 25, 2022, 5:23pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
