Skip to main content
POST
/
users
/
{user_id}
/
phones
Add User Phone
curl --request POST \
  --url https://api.wacht.dev/users/{user_id}/phones \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phone_number": "+1234567890",
  "is_primary": false
}
'
{
  "id": "<string>",
  "phone_number": "+1234567890",
  "is_primary": true,
  "is_verified": true,
  "verified_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication using the Authorization header

Path Parameters

user_id
string
required

(i64 formatted as string)

Body

application/json
phone_number
string
required
Example:

"+1234567890"

is_primary
boolean
default:false

Response

Phone added successfully

id
string

(i64 formatted as string)

phone_number
string
Example:

"+1234567890"

is_primary
boolean
is_verified
boolean
verified_at
string<date-time> | null