Update device metadata

PUT/devices/{deviceID}

Update APNs token, app version, or device name. All fields are optional.

Auth:Bearer

Path parameters

deviceID

uuidrequired

Request body

device_name

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

string
apns_token

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

string
app_version

Version of the Phosra app installed on the device.

string
os_version

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

string

Response

id

Unique identifier for this resource.

uuid
child_id

Identifier of the child this resource belongs to.

uuid
family_id

Identifier of the family this resource belongs to.

uuid
platform_id

Identifier of the associated platform.

string
device_name

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

string
device_model

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

string
os_version

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

string
app_version

Version of the Phosra app installed on the device.

string
apns_token

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

stringnull
capabilities

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

string[]
enforcement_summary

Per-category enforcement results from the device's last enforcement_status report

object
last_seen_at

RFC 3339 timestamp.

datetime
last_policy_version

Policy version the device last successfully applied.

integer
status

Current lifecycle state of the resource.

active | inactive | revoked
created_at

RFC 3339 timestamp of when the resource was created.

datetime
updated_at

RFC 3339 timestamp of the resource's most recent update.

datetime
Request
bash
curl -sS -X PUT "https://phosra-api-sandbox-production.up.railway.app/api/v1/devices/d1e2f3a4-5b6c-4d7e-8f90-a1b2c3d4e5f6" \
  -H "Authorization: Bearer $PHOSRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "device_name": "Mia iPhone",
  "app_version": "1.5.0",
  "os_version": "18.6"
}'
Response
json
{
  "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"
}