List Devices

Updated on: October 9, 2025
Purpose: Retrieve all Salpre Boxes (devices) connected to your account. Use this to get the serial numbers and status of devices before initiating calls.


Endpoint

GET https://ai.salpre.com/api/gateway/v1/salprebox/device-list

Authentication:
All requests require your Account Secret Key.

account-secret-key: YOUR_API_KEY

Keep your Account Secret Key private. Always make requests from your backend server.


Parameters

This endpoint does not require any parameters.


Code samples

cURL (Bash)

curl --location --request GET 'https://ai.salpre.com/api/gateway/v1/salprebox/device-list' \
--header 'account-secret-key: YOUR_API_KEY'

JavaScript (Fetch)

const myHeaders = new Headers();
myHeaders.append("account-secret-key", "YOUR_API_KEY");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://ai.salpre.com/api/gateway/v1/salprebox/device-list", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log("error", error));

Example response

{
  "status": "success",
  "data": [
    {
      "id": 42,
      "serial_no": "SALPRE-BOX-42A8F9",
      "device_name": "Main Office Box",
      "connected": true,
      "battery_level": 94,
      "last_seen": "2025-10-09T13:21:15Z",
      "firmware_version": "1.2.5"
    },
    {
      "id": 43,
      "serial_no": "SALPRE-BOX-43D1C3",
      "device_name": "Support Line Box",
      "connected": false,
      "battery_level": null,
      "last_seen": "2025-10-08T22:14:03Z",
      "firmware_version": "1.2.3"
    }
  ]
}

Error responses

Missing or invalid authentication key

{
  "status": "error",
  "message": "Unauthorized. Missing or invalid account-secret-key"
}

No devices found

{
  "status": "error",
  "message": "No connected devices found for this account"
}

Notes & best practices

  • Use this endpoint to find your Salpre Box serial numbers before making calls.
  • Each device entry includes real-time connection info and last activity timestamps.
  • Check connected: true before attempting outbound calls.
  • Keep your firmware up to date for best stability and performance.

Next