Register an Apple device

POST/children/{childID}/devices

Register a device for on-device policy enforcement. Returns a one-time API key the iOS app stores in Keychain.

Auth:Bearer

Path parameters

childID

uuidrequired

Request body

device_name

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

stringrequired
device_model

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

stringrequired
os_version

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

stringrequired
app_version

Version of the Phosra app installed on the device.

stringrequired
apns_token

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

string
capabilities

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

string[]

Response

device

object
api_key

One-time device API key (store in Keychain)

string
Request
bash
curl -sS -X POST "https://phosra-api-sandbox-production.up.railway.app/api/v1/children/a11ce0fa-0000-4000-8000-0000000000a1/devices" \
  -H "Authorization: Bearer $PHOSRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "device_name": "Mia iPhone",
  "device_model": "iPhone15,2",
  "os_version": "18.5",
  "app_version": "1.4.0"
}'
Response
json
{
  "device": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "child_id": "550e8400-e29b-41d4-a716-446655440000",
    "family_id": "550e8400-e29b-41d4-a716-446655440000",
    "platform_id": "string",
    "device_name": "string",
    "device_model": "string",
    "os_version": "string",
    "app_version": "string",
    "apns_token": null,
    "capabilities": [
      "string"
    ],
    "enforcement_summary": {},
    "last_seen_at": null,
    "last_policy_version": 0,
    "status": "active",
    "created_at": "2025-01-15T09:30:00Z",
    "updated_at": "2025-01-15T09:30:00Z"
  },
  "api_key": "string"
}