---
title: "Get a device"
method: GET
path: "/api/v1/gateway/devices/{id}"
tags: ["gateway"]
---

# Get a device

`GET /api/v1/gateway/devices/{id}`

## Request

- Base URL: `https://api.textbee.dev`
- URL: `https://api.textbee.dev/api/v1/gateway/devices/{id}`
- Auth: API key in header `x-api-key`

Full state of one device, including its last heartbeat, battery, and SIM list.

## Path parameters

- `id` string, required

## Response `200`

The device.

- DeviceResponseDTO
  - `data` DeviceDTO, required
    - `_id` string, required: Device id. Pass it as deviceId when sending.
    - `user` string, required: Owner account id.
    - `enabled` boolean, required: Whether the device may send and receive SMS. Sending to a disabled device fails.
    - `isDefault` boolean, required: Whether sends without a deviceId go out from this device.
    - `brand` string, required: Device brand.
    - `manufacturer` string, required: Device manufacturer.
    - `model` string, required: Device model.
    - `name` string: Your own label for the device.
    - `buildId` string, required: Android build id.
    - `os` string, required: Operating system name.
    - `osVersion` string, required: Android release version.
    - `osApiLevel` number: Android SDK level.
    - `osVersionSource` 'reported' | 'fingerprint' | 'buildId': How osVersion was determined.
    - `osBuildFingerprint` string: Android build fingerprint.
    - `appVersionName` string: textbee app version name.
    - `appVersionCode` number: textbee app version code.
    - `sentSMSCount` number, required: Messages this device has sent.
    - `receivedSMSCount` number, required: Messages this device has received.
    - `heartbeatEnabled` boolean, required: Whether the device reports heartbeats.
    - `heartbeatIntervalMinutes` number, required: Minutes between heartbeats.
    - `receiveSMSEnabled` boolean, required: Whether incoming messages are forwarded to textbee. Required for received message history and webhooks.
    - `smsSendDelaySeconds` number, required: Seconds the device waits between messages in a batch.
    - `lastHeartbeat` string, date-time: Last heartbeat. A device silent for long is likely offline and sends will queue.
    - `batteryInfo` BatteryInfoDTO
      - `percentage` number: Battery level, 0 to 100.
      - `isCharging` boolean: Whether the device was charging at the last heartbeat.
      - `lastUpdated` string, date-time: When this reading was taken.
    - `networkInfo` NetworkInfoDTO
      - `networkType` 'wifi' | 'cellular' | 'none': Connection the device last reported.
      - `lastUpdated` string, date-time: When this reading was taken.
    - `appVersionInfo` AppVersionInfoDTO
      - `versionName` string: textbee app version name.
      - `versionCode` number: textbee app version code.
      - `lastUpdated` string, date-time: When this reading was taken.
    - `deviceUptimeInfo` DeviceUptimeInfoDTO
      - `uptimeMillis` number: Milliseconds since the device booted.
      - `lastUpdated` string, date-time: When this reading was taken.
    - `memoryInfo` MemoryInfoDTO
      - `freeBytes` number: Free memory in bytes.
      - `totalBytes` number: Total memory in bytes.
      - `maxBytes` number: Maximum memory the app may use, in bytes.
      - `lastUpdated` string, date-time: When this reading was taken.
    - `storageInfo` StorageInfoDTO
      - `availableBytes` number: Free storage in bytes.
      - `totalBytes` number: Total storage in bytes.
      - `lastUpdated` string, date-time: When this reading was taken.
    - `systemInfo` DeviceSystemInfoDTO
      - `timezone` string: Device timezone.
      - `locale` string: Device locale.
      - `lastUpdated` string, date-time: When this reading was taken.
    - `powerInfo` PowerInfoDTO
      - `isIgnoringBatteryOptimizations` boolean: Whether the app is exempt from battery optimization. When false, Android may delay the app in the background.
      - `isDeviceIdleMode` boolean: Whether the device was in Doze at the last heartbeat.
      - `isPowerSaveMode` boolean: Whether battery saver was on at the last heartbeat.
      - `lastUpdated` string, date-time: When this reading was taken.
    - `simInfo` SimInfoCollectionDTO
      - `lastUpdated` string, date-time, required: When the device last reported its SIM list.
      - `sims` SimInfoDTO[], required: SIMs currently installed in the device.
        - `subscriptionId` number, required: Android subscription id of the SIM. Pass it as simSubscriptionId when sending to choose this SIM. It can change when the SIM is removed and reinserted or swapped.
        - `iccId` string: ICCID of the SIM card.
        - `cardId` number: Android card id of the SIM slot.
        - `carrierName` string: Mobile network operator, as reported by Android.
        - `displayName` string: Label the user gave this SIM on the device.
        - `simSlotIndex` number: Physical SIM slot, starting at 0.
        - `mcc` string: Mobile country code.
        - `mnc` string: Mobile network code.
        - `countryIso` string: Two letter country code of the SIM.
        - `subscriptionType` 'PHYSICAL_SIM' | 'ESIM': Whether the SIM is physical or an eSIM.
        - `serviceState` 'IN_SERVICE' | 'OUT_OF_SERVICE' | 'EMERGENCY_ONLY' | 'POWER_OFF' | 'UNKNOWN': Whether the SIM had network service when the device last reported.
        - `simState` string: State of the SIM card itself, as reported by Android.
        - `isRoaming` boolean: Whether the SIM was roaming when the device last reported.
        - `signalLevel` number: Signal strength on a 0 to 4 scale, where 0 is no signal.
    - `createdAt` string, date-time, required: When the device was registered.
    - `updatedAt` string, date-time, required: When the device was last updated.

## Other responses

- `400`: The device id is not a valid id.
- `401`: Missing, invalid, or revoked API key.
- `404`: No device with that id on your account.

---

[API](https://skmtc.dev/textbee/apis/textbee-api.md) · [All operations](https://skmtc.dev/textbee/apis/textbee-api/llms.txt) · [OpenAPI document](https://skmtc.dev/textbee/apis/textbee-api/revisions/e720417e9514?raw)
