textbee Logotextbee.dev
Save 44% with yearly billing.View Plans
Documentation

Managing devices

List and inspect the Android phones on your textbee account, choose the sending device, read phone health from the API, and manage the device limit.

Updated

A device is an Android phone with the textbee app registered to your account. Each device sends and receives SMS through its own SIM cards. Use the devices endpoints to find device IDs, pick the sending phone, and check whether a phone is online and healthy.

List and inspect devices

The devices endpoint returns every phone on your account.

GET/api/v1/gateway/devices, open in the API reference

To read one device, use its _id:

GET/api/v1/gateway/devices/{id}, open in the API reference

This request lists your devices:

Shell
curl https://api.textbee.dev/api/v1/gateway/devices \
  -H "x-api-key: YOUR_API_KEY"

The response wraps an array in data. This example is trimmed to the most useful fields:

JSON
{
  "data": [
    {
      "_id": "664a9b8cd0e1f2a3b4c5d6e7",
      "name": "Office phone",
      "enabled": true,
      "isDefault": true,
      "brand": "google",
      "model": "Pixel 7",
      "osVersion": "16",
      "appVersionName": "2.8.0",
      "receiveSMSEnabled": true,
      "smsSendDelaySeconds": 3,
      "heartbeatEnabled": true,
      "heartbeatIntervalMinutes": 30,
      "lastHeartbeat": "2026-09-28T09:45:12.000Z",
      "sentSMSCount": 1832,
      "receivedSMSCount": 412,
      "batteryInfo": { "percentage": 86, "isCharging": true, "lastUpdated": "2026-09-28T09:45:12.000Z" },
      "networkInfo": { "networkType": "wifi", "lastUpdated": "2026-09-28T09:45:12.000Z" },
      "powerInfo": {
        "isIgnoringBatteryOptimizations": true,
        "isDeviceIdleMode": false,
        "isPowerSaveMode": false,
        "lastUpdated": "2026-09-28T09:45:12.000Z"
      },
      "simInfo": {
        "lastUpdated": "2026-09-28T09:45:12.000Z",
        "sims": [
          { "subscriptionId": 1, "simSlotIndex": 0, "serviceState": "IN_SERVICE", "signalLevel": 3 }
        ]
      },
      "createdAt": "2026-06-02T14:20:31.000Z",
      "updatedAt": "2026-09-28T09:45:12.000Z"
    }
  ]
}

Device fields

FieldDescription
_idDevice ID. Pass it as deviceId when you send.
enabledWhether the device may send and receive SMS. Sending to a disabled device fails.
isDefaultWhether sends without a deviceId go out from this device.
nameYour own label for the device.
lastHeartbeatTime of the last heartbeat from the phone. A device silent for a long time is likely offline, and sends to it wait in the queue.
heartbeatIntervalMinutesMinutes between heartbeats.
smsSendDelaySecondsSeconds the phone waits between messages in a batch. Set it in the app under Send Delay.
receiveSMSEnabledWhether the phone forwards incoming SMS. Required for received history and webhooks.
appVersionNametextbee app version on the phone.
batteryInfoBattery percentage and isCharging at the last heartbeat.
networkInfonetworkType at the last heartbeat: wifi, cellular or none.
powerInfoAndroid power state at the last heartbeat. Explains a phone that is online but slow.
simInfoSIMs in the phone. Each subscriptionId is a valid simSubscriptionId for sends.
sentSMSCountMessages this device has sent.
receivedSMSCountMessages this device has received.

The device record also has brand, manufacturer, model, os, osVersion, appVersionCode, heartbeatEnabled, appVersionInfo, deviceUptimeInfo, memoryInfo, storageInfo and systemInfo (timezone and locale). The API reference describes each one.

How textbee chooses the sending device

When you send with POST /gateway/send-sms or POST /gateway/send-bulk-sms, textbee picks the device in this order:

  1. The deviceId in the request, if you pass one.
  2. Your default device (isDefault: true), if it is enabled.
  3. The enabled device with the most recent heartbeat.

A malformed deviceId returns 400, and an ID that is not on your account returns 404. textbee does not fall back to another phone, so a typo never sends from the wrong device. With no deviceId and no enabled device, the send returns 400. To pick a SIM on the chosen phone, see Choosing a SIM.

Manage devices

Some actions are in the dashboard, and some are in the app on the phone.

ActionWhereWhat it does
Set as defaultDashboard, device menuSends without a deviceId go out from this device.
DeleteDashboard, device menuRemoves the device from your account. Its messages leave your message history.
Enable or disableApp, Settings > Gateway EnabledA disabled device does not send or receive, and sends to it fail. It does not count toward the active device limit.
RenameApp, Settings > Device NameChanges name, the label in the dashboard and the API.

Delete a device only when you no longer need its history. To stop a phone for a while, disable it instead.

Disconnect on the phone or delete in the dashboard

These two actions are different:

  • Disconnect Device in the app removes the credentials from the phone only. The app stops sending heartbeats. The device record, its settings and its history stay on your account. An enabled device still counts toward the active device limit.
  • Delete in the dashboard removes the device record from your account. The phone cannot send or receive through textbee until you register the app again.

To connect a phone again after a disconnect, see Reconnecting an old device.

Active device limit

Each plan allows a number of active (enabled) devices. When you register or enable a device over that number, the API returns HTTP 429 with this message:

Active device limit reached: your plan allows up to N active device(s) and you have N. Disable or delete another device, or upgrade your plan

To fix it, disable a device you do not use, delete it, or change your plan. Pricing lists the device limit of each plan.

Use several phones

More phones give you more capacity and a backup.

  • Throughput. Each phone sends at its own pace, set by its send delay and its carrier. Two phones can send about twice as many messages per minute. Split the load by passing a different deviceId per request.
  • Redundancy. textbee does not move a send to another phone when the default phone is offline. Check lastHeartbeat before a send and pass the deviceId of a healthy phone.
  • One phone per number. A phone with two SIMs is one device. Choose the SIM with simSubscriptionId. Use a separate phone when you need more capacity on the same number set.

Received messages from all phones appear in one history. Filter them with deviceIds. See Message history and polling.

Check phone health from the API

Read these fields from GET /gateway/devices/{id} to judge whether a phone can send now:

CheckHealthyProblem sign
lastHeartbeat ageLess than about two heartbeatIntervalMinutesMuch older: the phone is likely offline or Android stopped the app
powerInfo.isIgnoringBatteryOptimizationstruefalse: Android can delay the app in the background
powerInfo.isPowerSaveModefalsetrue: battery saver can slow sends
powerInfo.isDeviceIdleModefalsetrue: the phone was in Doze at the last heartbeat
batteryInfoCharging, or a high percentageLow battery and not charging
networkInfo.networkTypewifi or cellularnone
simInfo.sims[].serviceStateIN_SERVICEOUT_OF_SERVICE, EMERGENCY_ONLY or POWER_OFF

A heartbeat time in the future means the phone clock changed. Fix the date and time on the phone.

The app has the same checks on the phone. Open Settings > Device health: "What can slow down or stop messages on this phone, in either direction, and what to change." It lists each problem with the fix for your phone brand. The guide Keep the phone online walks through each fix.

Frequently asked questions

Where do I find a device ID?

Call GET /gateway/devices and read _id. The app also shows it under Settings > Device ID.

Can I change a device with the API?

The API reads devices. Enable, disable and rename a device in the app. Set the default device in the dashboard, or with setDefaultDevice in the JavaScript SDK.

Why is lastHeartbeat old?

The phone has not sent a heartbeat for a while. The phone is off, has no network, or Android stopped the app in the background. See Keep the phone online.

Does deleting a device delete the phone's SMS?

No. Delete removes the device and its messages from textbee only. The SMS in the phone's own inbox stay on the phone.

Next steps