Phones
Upsert Phone
Updates properties of a user's phone. If the phone with this number does not exist, a new one will be created. Think of this method like an 'upsert'
put/phones
Request body
Example request
{
"fcm_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzd.....",
"max_send_attempts": 2,
"message_expiration_seconds": 12345,
"message_send_schedule_id": "32343a19-da5e-4b1b-a767-3298a73703cb",
"messages_per_minute": 1,
"missed_call_auto_reply": "e.g. This phone cannot receive calls. Please send an SMS instead.",
"phone_number": "+18005550199",
"sim": "SIM1"
}Response
OK
Example response
{
"data": {
"created_at": "2022-06-05T14:26:02.302718+03:00",
"fcm_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzd.....",
"id": "32343a19-da5e-4b1b-a767-3298a73703cb",
"max_send_attempts": 2,
"message_send_schedule_id": "32343a19-da5e-4b1b-a767-3298a73703cb",
"messages_per_minute": 1,
"missed_call_auto_reply": "This phone cannot receive calls. Please send an SMS instead.",
"phone_number": "+18005550199",
"updated_at": "2022-06-05T14:26:10.303278+03:00",
"user_id": "WB7DRDWrJZRGbYrv2CKGkqbzvqdC"
},
"message": "Request handled successfully",
"status": "success"
}