Skip to main content
POST
/
children
/
{childID}
/
devices
SDK (@phosra/sdk)
import { PhosraClient } from "@phosra/sdk";

const phosra = new PhosraClient({
  baseUrl: "https://phosra-api-sandbox-production.up.railway.app/api/v1",
  accessToken: process.env.PHOSRA_API_KEY,
});

const result = await phosra.devices.register("a11ce0fa-0000-4000-8000-0000000000a1", {
  device_name: "Mia's iPhone",
  device_model: "iPhone15,2",
  os_version: "18.5",
  app_version: "1.4.0"
});
console.log(result);
{
  "device": {
    "id": "5e0a9c37-1b64-4d82-96f3-2c8a7e0b4d19",
    "child_id": "ca02f5d1-fee8-4201-b5ca-fdc8be506e1e",
    "family_id": "fcdf4277-ba14-4732-8db5-0369b2c88d8b",
    "platform_id": "nextdns",
    "device_name": "Ada's iPhone",
    "device_model": "iPhone15,3",
    "os_version": "18.5",
    "app_version": "2.4.0",
    "apns_token": "8f7d3c1b2a90e64f5d8c7b6a1f0e9d3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6",
    "capabilities": [
      "FamilyControls",
      "ManagedSettings",
      "DeviceActivity"
    ],
    "enforcement_summary": {},
    "last_seen_at": "2026-07-05T22:04:18Z",
    "last_policy_version": 0,
    "status": "active",
    "created_at": "2026-06-18T14:32:07Z",
    "updated_at": "2026-06-30T09:15:44Z"
  },
  "api_key": "dvk_test_3a9f1c7e5b2d8046a1f3c9e7b5d2086"
}
Register an Apple device against a child to drive on-device enforcement (Screen Time / MDM-style controls). Once registered, the device pulls its compiled policy and reports activity back.
curl -X POST https://phosra-api-sandbox-production.up.railway.app/api/v1/children/$CHILD_ID/devices \
  -H "Authorization: Bearer $PHOSRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Mia’s iPad","platform":"ios"}'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

childID
string<uuid>
required

Body

application/json
device_name
string
required

User-assigned device name (e.g. "Ada's iPhone").

device_model
string
required

Hardware model identifier (e.g. iPhone15,3).

os_version
string
required

Operating-system version reported by the device (e.g. 18.5).

app_version
string
required

Version of the Phosra app installed on the device.

apns_token
string

Apple Push Notification service device token; null until the device registers for push.

capabilities
string[]

Apple frameworks the device supports (e.g. FamilyControls, ManagedSettings, DeviceActivity)

Response

Device registered

device
object
api_key
string

One-time device API key (store in Keychain)