Get compiled policy for device
/device/policyReturns a structured policy document the iOS app interprets to configure FamilyControls/ManagedSettings. Supports conditional polling via since_version query parameter.
X-Device-KeyQuery parameters
since_versionReturn 304 if policy version is <= this value
Response
versionMonotonically increasing version, bumped on every change.
child_idIdentifier of the child this resource belongs to.
child_ageChild's age in years, derived from birth_date.
age_groupDerived age band used to pick default rules (e.g. `elementary`, `teen`).
policy_idIdentifier of the policy this resource belongs to.
statusCurrent lifecycle state of the resource.
generated_atRFC 3339 timestamp.
content_filterResolved content-filtering settings for the child.
screen_timeResolved screen-time limits and schedule for the child.
purchasesResolved purchase-control settings for the child.
privacyResolved privacy settings for the child.
socialResolved social and chat settings for the child.
notificationsResolved notification-curfew settings for the child.
web_filterResolved web-filtering settings for the child.
curl -sS "https://phosra-api-sandbox-production.up.railway.app/api/v1/device/policy" \
-H "X-Device-Key: $PHOSRA_DEVICE_KEY"{
"version": 0,
"child_id": "550e8400-e29b-41d4-a716-446655440000",
"child_age": 0,
"age_group": "string",
"policy_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "string",
"generated_at": "2025-01-15T09:30:00Z",
"content_filter": {
"age_rating": "string",
"max_ratings": {},
"blocked_apps": [
"string"
],
"allowed_apps": [
"string"
],
"allowlist_mode": true
},
"screen_time": {
"daily_limit_minutes": 0,
"per_app_limits": [
{
"bundle_id": "string",
"daily_minutes": 0
}
],
"downtime_windows": [
{
"days_of_week": [
"string"
],
"start_time": "string",
"end_time": "string"
}
],
"always_allowed_apps": [
"string"
],
"schedule": {
"weekday": {
"start": "string",
"end": "string"
},
"weekend": {
"start": "string",
"end": "string"
}
}
},
"purchases": {
"require_approval": true,
"block_iap": true,
"spending_cap_usd": 0
},
"privacy": {
"location_sharing_enabled": true,
"profile_visibility": "string",
"account_creation_approval": true,
"data_sharing_restricted": true
},
"social": {
"chat_mode": "string",
"dm_restriction": "string",
"multiplayer_mode": "string"
},
"notifications": {
"curfew_start": "string",
"curfew_end": "string",
"usage_timer_minutes": 0
},
"web_filter": {
"level": "string",
"safe_search": true,
"blocked_domains": [
"string"
],
"allowed_domains": [
"string"
],
"blocked_categories": [
"string"
]
}
}