Skip to main content
PUT
https://staging-api.propaga.io/v1
/
account
/
{userId}
curl --location 
--request PUT 'https://staging-api.propaga.io/v1/account/{userId}'
--header 'Authorization: <your_awesome_token>'
--header 'Content-Type: application/json'
--data '{
    "phoneNumber": "5512345678"
}'
{
    "userId": "dca522d1-7150-4aca-856f-94f1dc5e1abf",
    "phoneNumber": "5512345678"
}
We recommend that you call this endpoint to update the user’s phone number after the user has validated this new number.
curl --location 
--request PUT 'https://staging-api.propaga.io/v1/account/{userId}'
--header 'Authorization: <your_awesome_token>'
--header 'Content-Type: application/json'
--data '{
    "phoneNumber": "5512345678"
}'
{
    "userId": "dca522d1-7150-4aca-856f-94f1dc5e1abf",
    "phoneNumber": "5512345678"
}

Path parameters

userId
string
required
Propaga’s user id

Body

phoneNumber
string
required
A valid new phone number

Response

userId
string
phoneNumber
string

Error codes

User not found (404)
{
    "errorCode": "USER_NOT_FOUND",
    "errorMessage": "This user not found"
}
Phone number is already in use (400)
{
    "errorCode": "PHONE_NUMBER_ALREADY_EXISTS",
    "errorMessage": "This phone number already exists. Used by user with id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Phone number not valid (400)
{
    "statusCode": 400,
    "message": [
        "phoneNumber must be a valid phone number"
    ],
    "error": "Bad Request"
}