https://phosra-api-sandbox-production.up.railway.app. No API key, nothing to install.
Sandbox-first. These calls run against the open sandbox with no credential. The shapes are
identical in production: swap the base URL for
https://prodapi.phosra.com and add a
phosra_live_… key.Prerequisites
This recipe starts from a child with an active policy and at least one connected platform. If you ran Onboard a multi-child household you already have the child and policy — the two calls below add a connected console (Xbox) so there is something to enforce against. Set the base URL and IDs once:Don’t have a family yet? Run Onboard a multi-child household
first (three calls), or the End-to-end walkthrough for the full
platform-link ceremony. Then come back with your own
CHILD_ID.Find the child's active policy
GET /children/{childID}/policies lists a child’s
policies. Grab the active one — that is the policy enforcement reads from.Locate the rule to change
GET /policies/{policyID}/rules lists every rule on the
policy. Find the time_daily_limit rule — it is currently 180 minutes — and keep its id.Tighten the limit
PUT /rules/{ruleID} updates a single rule in place. Drop the
daily limit from 180 to 120 minutes.Enforce the policy
POST /children/{childID}/enforce pushes the
child’s current active policy to every platform the family has connected. It returns an
enforcement job that runs asynchronously.Poll the job to completion
GET /enforcement/jobs/{jobID} returns the job’s
status. In the sandbox it finishes in well under a second; poll until status is completed.Read the per-platform report
GET /enforcement/jobs/{jobID}/results
returns one result per connected platform. This is where you learn exactly what landed: Xbox
applied 5 rules, guided several more, and flagged the categories a console can’t enforce.time_daily_limit.limit_minutes — your rule change
made it to the platform. Read the three statuses this way:| Status | Meaning |
|---|---|
applied | Phosra enforced the rule directly on the platform (e.g. curfew, monitoring). |
guided | The platform accepts the setting but enforces it itself; Phosra configured and attested it (e.g. the console’s own screen-time and rating gate). |
unenforceable_categories | Rules this platform has no surface for — a console can’t run a web-content filter. They are reported, never silently dropped. |
Why 'guided' and not 'applied'?
Why 'guided' and not 'applied'?
A game console owns its own screen-time and content-rating controls. Phosra sets them and records a
signed attestation (
enforcement_mode: manual_attested) rather than pretending it flipped a switch
it doesn’t own. A DNS filter or MDM profile, by contrast, returns applied for the categories it
enforces directly. The result report never conflates the two — you always know who is holding the
line.The whole flow at a glance
| # | Step | Call | Live result |
|---|---|---|---|
| 1 | Find active policy | GET /children/{id}/policies | policy a3147895…, active |
| 2 | Locate the rule | GET /policies/{id}/rules | time_daily_limit = 180 min |
| 3 | Tighten it | PUT /rules/{id} | 120 min |
| 4 | Enforce | POST /children/{id}/enforce | job 67c763ff…, running |
| 5 | Poll | GET /enforcement/jobs/{id} | completed in ~0.14s |
| 6 | Read results | GET /enforcement/jobs/{id}/results | Xbox: 5 applied, 120-min limit guided |
Next steps
Onboard a multi-child household
Where the child and policy in this recipe came from — two kids, two age-tuned policies.
Enforcement, explained
What
applied, guided, and unenforceable mean per platform, and how attestation works.Policies & rules
The full rule catalog and config shapes behind
time_daily_limit and friends.Retry a failed job
When a platform is offline mid-enforce, re-run just the failed results.