Skip to content

Create a Phone

Request

OAuth 2.0 scope:
  • okta.myAccount.phone.manage

Creates an UNVERIFIED status phone for either the SMS or CALL method to the user's MyAccount setting

Headers
Acceptstringrequired

Specifies the API version. Current version: 1.0.0

Example:application/json; okta-version=1.0.0
Bodyapplication/json
profileobjectrequired

Defines the phone number on the profile

sendCodeboolean

Whether to send a challenge to the newly added phone

Default:true
methodstringwrite-only

The method of the challenge sent to the newly added phone. Applicable when sendCode is true.

Enum:"SMS""CALL"
Example:"SMS"
POST
/idp/myaccount/phones
curl -i -X POST \
  https://okta-subdomain.pixtulate.com/idp/myaccount/phones \
  -H 'Accept: application/json; okta-version=1.0.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "profile": {
      "phoneNumber": "+1(444)444-4444"
    },
    "sendCode": true,
    "method": "SMS"
  }'

Responses

Example response

Bodyapplication/json;okta-version=1.0.0
idstring, non-emptyread-onlyrequired

The phone ID of the caller

profileobjectrequired

Defines the phone number on the profile

statusstring, non-emptyread-onlyrequired

The phone status of the caller

Enum:"VERIFIED""UNVERIFIED"
Response
{ "id": "sms18vtfKgzqDhNqP0g4", "status": "UNVERIFIED", "profile": { "phoneNumber": "+1(444)444-4444" }, "_links": { "self": {}, "challenge": {}, "verify": {} } }