Skip to main content
GET
/
api
/
public
/
v1
/
devices
/
locations
List locations
curl --request GET \
  --url https://app.msportal.ai/api/public/v1/devices/locations \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "name": "<string>",
      "companyId": "<string>",
      "companyName": "<string>",
      "address": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postalCode": "<string>",
      "country": "<string>",
      "phone": "<string>",
      "email": "<string>",
      "deviceCount": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "pagination": {
    "page": 2,
    "limit": 50,
    "totalCount": 123,
    "totalPages": 123,
    "hasNextPage": true,
    "hasPrevPage": true
  }
}

Authorizations

Authorization
string
header
required

Use your API key as a Bearer token. API keys can be generated in Settings → Integrations → API Access.

Query Parameters

page
number
default:1

Page number

Required range: x >= 1
limit
number
default:100

Items per page

Required range: 1 <= x <= 100
companyId
string<uuid>

Filter by company ID

includeDeviceCount
boolean | null
default:false

Include count of devices per location

Response

List of locations

data
object[]
required

Array of locations

pagination
object
required