User Devices

Manage the devices registered to your account. List, register, and remove devices used for VPN connections.

List User Devices

Retrieve all devices currently registered to the authenticated user's account. Each device entry includes platform details, app version, and activity status.

GET/api/v1/users/me/devices

List all devices registered to the authenticated user

Authentication:Bearer Token
curl -X GET https://api.orbai.world/api/v1/users/me/devices \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
200Device list retrieved successfully
{
  "success": true,
  "data": {
    "devices": [
      {
        "id": 1001,
        "device_id": "d4e5f6a7-b8c9-0123-4567-890abcdef012",
        "os": "android",
        "device_model": "Pixel 8 Pro",
        "device_name": "John's Phone",
        "app_version": "3.2.1",
        "is_active": true,
        "is_blocked": false,
        "login_date": "2026-02-08T08:00:00Z",
        "logout_date": null
      },
      {
        "id": 1002,
        "device_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "os": "ios",
        "device_model": "iPhone 16 Pro",
        "device_name": "John's iPad",
        "app_version": "3.2.0",
        "is_active": false,
        "is_blocked": false,
        "login_date": "2026-02-05T15:30:00Z",
        "logout_date": "2026-02-07T22:00:00Z"
      }
    ]
  }
}
401Authentication required
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or expired access token"
  }
}

Register Device

Register a new device to the authenticated user's account. This must be done before connecting to VPN servers from a new device.

POST/api/v1/users/me/devices

Register a new device to the user's account

Authentication:Bearer Token
ParameterTypeRequiredDescription
device_idstring RequiredUnique device identifier (UUID format recommended)
platformstringOptionalDevice platform: android, ios, windows, macos, linux
device_namestringOptionalHuman-readable name for the device (e.g., "John's Phone")
fcm_tokenstringOptionalFirebase Cloud Messaging token for push notifications on this device

Device Limits

The maximum number of devices you can register depends on your subscription plan. If you reach the limit, you must remove an existing device before registering a new one.

curl -X POST https://api.orbai.world/api/v1/users/me/devices \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "d4e5f6a7-b8c9-0123-4567-890abcdef012",
    "platform": "android",
    "device_name": "John'\''s Pixel",
    "fcm_token": "fMR91bGSRi2Y7..."
  }'
201Device registered successfully
{
  "success": true,
  "data": {
    "id": 1003,
    "device_id": "d4e5f6a7-b8c9-0123-4567-890abcdef012",
    "os": "android",
    "device_model": null,
    "device_name": "John's Pixel",
    "app_version": null,
    "is_active": false,
    "is_blocked": false,
    "login_date": null,
    "logout_date": null
  }
}
409Device limit reached
{
  "success": false,
  "error": {
    "code": "DEVICE_LIMIT_REACHED",
    "message": "Maximum number of devices reached for your subscription plan. Remove an existing device first."
  }
}

Remove Device

Remove a registered device from the authenticated user's account. The device will be immediately disconnected from any active VPN sessions.

DELETE/api/v1/users/me/devices/{deviceId}

Remove a device from the user's account

Authentication:Bearer Token
ParameterTypeRequiredDescription
deviceIdinteger RequiredThe numeric ID of the device to remove (from the device list response)

Active Sessions

Removing a device will immediately terminate any active VPN connection on that device. The device will need to be re-registered to connect again.

curl -X DELETE https://api.orbai.world/api/v1/users/me/devices/1003 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
204Device removed successfully
// No response body - HTTP 204 No Content
404Device not found
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Device not found or does not belong to the authenticated user"
  }
}