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. In production the
compliance endpoints are family-scoped and require a
phosra_live_… key whose caller is a member
of the family — the request shapes are identical.Before you start
This recipe assumes a family that has connected at least one platform. If you ran Change a rule and enforce it you already have one; the IDs below are from a family with an Xbox and a PlayStation connected. Set the base URL and IDs once:Audit the family's platform links
GET /families/{familyID}/compliance lists
every platform the family has connected, with two health fields per link: last_enforcement_at and
last_enforcement_status. This is your disconnect detector.200. Here the PlayStation link has no last_enforcement_at — it was re-connected but
never re-enforced, so the console is not yet on the current policy. That is the drop signal:| Signal on a link | Meaning | Action |
|---|---|---|
| Platform absent from the list | The link was removed (revoked/expired). | Re-establish it (next step). |
No last_enforcement_at | Connected but never enforced since. | Re-enforce (step 3). |
last_enforcement_status: "partial" | Some rules did not fully land. | Re-enforce, then read the per-platform report. |
status: "verified" + recent last_enforcement_at: "completed" | Healthy — no action. | — |
A completely dropped platform is simply not in this array. If a family used to have three
consoles and the list returns two, the third is your disconnected link — re-establish it with the
same
POST /compliance you used to connect it originally.Re-establish the link
If the platform is gone, Live
POST /api/v1/compliance
re-connects it with a fresh credential. (If the stale link still exists, remove it first with
DELETE /api/v1/compliance/{linkID} — shown in
the accordion — then re-create it, so you are not left with two links for one platform.)201 — a fresh link, verified, with a new id:Tearing down the stale link first — DELETE /compliance/{linkID}
Tearing down the stale link first — DELETE /compliance/{linkID}
When the old link still exists (its credential is dead but the row remains), remove it before
re-creating so the family has exactly one link per platform:
Deleting an unknown id is a no-op you can rely on: the live sandbox returns
cURL
| Status | Meaning |
|---|---|
204 | Link removed. |
404 | compliance link not found — already gone; safe to proceed to re-create. |
403 | not a member of this family — production only; supply a family-scoped key. |
{"error":"Not Found","message":"compliance link not found","code":404}.Re-enforce the current policy
A re-established link starts empty — it has no rules until you push them.
The job finishes in well under a second; poll
POST /children/{childID}/enforce pushes the
child’s active policy to every connected platform, including the one you just recovered.GET /enforcement/jobs/{jobID} until it reaches a
terminal status. Live terminal job:A
partial job status means at least one rule did not fully land on some platform — the job
still completed and every other rule was applied. Open the per-platform report
(GET /enforcement/jobs/{jobID}/results) to see exactly which category needs attention; the
Change a rule and enforce it recipe walks that report
in full. It is not a reason to re-run the enforce blindly.Confirm the platform is caught up
Re-run the audit from step 1. Both links now carry a fresh Live The dropped platform is reconnected and enforcing again.
last_enforcement_at — the recovered
PlayStation is back on the current policy:200 — the PlayStation link now has last_enforcement_at, matching the Xbox:last_enforcement_at moving forward for
every link is the recovery you were confirming.The whole flow at a glance
| # | Step | Call | Live result |
|---|---|---|---|
| 1 | Audit links | GET /families/{id}/compliance | PlayStation has no last_enforcement_at |
| 2 | Re-establish | POST /compliance | link f499f980…, verified |
| 3 | Re-enforce | POST /children/{id}/enforce → poll | job 81dd4f27…, terminal |
| 4 | Confirm | GET /families/{id}/compliance | both links freshly enforced |
Next steps
Disconnect & reconnect
The OAuth-connect mirror: handling a declined consent and re-approving cleanly.
Change a rule and enforce it
Read the per-platform enforcement report — what
applied, guided, and partial mean.Reconcile family drift
Recover from the other kind of drift — a family roster that no longer matches the platform.
Back off and retry a 429
When a call fails transiently rather than because the link is gone.