Get compiled policy for device

GET/device/policy

Returns a structured policy document the iOS app interprets to configure FamilyControls/ManagedSettings. Supports conditional polling via since_version query parameter.

Auth:X-Device-Key

Query parameters

since_version

Return 304 if policy version is <= this value

integer

Response

version

Monotonically increasing version, bumped on every change.

integer
child_id

Identifier of the child this resource belongs to.

uuid
child_age

Child's age in years, derived from birth_date.

integer
age_group

Derived age band used to pick default rules (e.g. `elementary`, `teen`).

string
policy_id

Identifier of the policy this resource belongs to.

uuid
status

Current lifecycle state of the resource.

string
generated_at

RFC 3339 timestamp.

datetime
content_filter

Resolved content-filtering settings for the child.

object
screen_time

Resolved screen-time limits and schedule for the child.

object
purchases

Resolved purchase-control settings for the child.

object
privacy

Resolved privacy settings for the child.

object
social

Resolved social and chat settings for the child.

object
notifications

Resolved notification-curfew settings for the child.

object
web_filter

Resolved web-filtering settings for the child.

object
Request
bash
curl -sS "https://phosra-api-sandbox-production.up.railway.app/api/v1/device/policy" \
  -H "X-Device-Key: $PHOSRA_DEVICE_KEY"
Response
json
{
  "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"
    ]
  }
}