v24

latestSwagger 2.0AGPL-3.0raw.githubusercontent.com2026-08-015163191.7 KB
Phones

Upserts the FCM token of a phone

Updates the FCM token of a 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/fcm-token

Request body

fcm_tokenstring required
phone_numberstring required
simstring required

SIM is the SIM slot of the phone in case the phone has more than 1 SIM slot

Example request

{
  "fcm_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzd.....",
  "phone_number": "[+18005550199]",
  "sim": "SIM1"
}

Response

OK

messagestring required
statusstring required

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"
}