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 — nothing you create
touches a real family. The shapes are identical in production: swap the base URL for
https://prodapi.phosra.com and authenticate with a phosra_live_… key.Before you start
Set the base URL once so every step is copy-paste:Onboard the family with the first child
POST /setup/quick onboards a family, the first child, and an age-appropriate starter policy in one
call. Give it the younger child — Leo, age 9.rule_summary — Leo, at 9,
lands in the child age group with a 90-minute daily limit and a PG rating ceiling.
Truncated to what you carry forward:family.id (the next child is added to it) and child.id (Leo, for the ratings check at the
end):Reference: quickstart · setup/quick
The one-call onboarding path, with the full request and response documented.
Add the second child
The teenager is added to the same family with
POST /families/{familyID}/children.
Only a name and birth date are required — Ava, age 16.Adding a child does not create a policy — unlike
setup/quick, which bundles one. That is the
next two steps: create a draft policy, then fill it from Ava’s age.Create a draft policy for the teen
POST /children/{childID}/policies creates an empty
draft policy. It has no rules yet — you fill it in the next step.Generate rules from Ava's age
This is the load-bearing call. The call returns the generated rules. Ava’s set is tuned to 16, not 9 — a longer daily limit, a
PG-13 ceiling, a lighter web filter, contacts-only DMs, a later curfew, and no age gate:Compare with Leo’s seeded policy from step 1 — same family, same code, different child:
POST /policies/{policyID}/generate-from-age
looks up the child on the policy, computes their age, and fills the policy with an age-appropriate
rule set at the strictness you pass. We use strict for the teen.| Rule | Leo (age 9, recommended) | Ava (age 16, strict) |
|---|---|---|
| Daily screen time | 90 min | 180 min |
| Content-rating ceiling | PG / CSM 7+ | PG-13 / CSM 13+ |
| Web filter | strict | light |
| DMs | friends_only | contacts_only |
| Curfew | 20:00–07:00 | 22:00–06:00 |
| Age gate | on (min 13) | off |
| Total rules enabled | 20 | 18 |
Fields & errors
Fields & errors
| Field | Type | Notes |
|---|---|---|
strictness | enum | recommended (default), strict, or relaxed. Shifts limits and thresholds; the rating ceiling is driven by age, not strictness. |
generate-from-age replaces the policy’s rules — it is a regenerate, not a merge. A policy with
no resolvable child returns 400. To hand-edit an individual rule afterward, see
Change a rule and enforce it.Activate the policy
A generated policy is still a Both children now have an active, age-tuned policy. Leo’s went live at step 1; Ava’s is live now.
draft. POST /policies/{policyID}/activate
makes it the child’s live policy and stamps a version.Confirm each child's rating ceiling
Isolation across children is not just “two policies exist” — it is “each policy matches that child’s
age.” Leo’s ceiling is PG / CSM 7+; Ava’s is PG-13 / CSM 13+ — exactly the
GET /children/{childID}/age-ratings returns
the rating ceiling Phosra computes from a child’s birth date. Run it for both and the numbers line up
with the policies you just generated.content_rating rule
each policy carries. One family, two children, two correct ceilings.The whole flow at a glance
Every row is one call you just ran, in order:| # | Step | Call | Live result |
|---|---|---|---|
| 1 | Onboard family + Leo | POST /setup/quick | family af03190e…, Leo (9), 20-rule PG policy |
| 2 | Add Ava | POST /families/{id}/children | child acf4ce5d…, age 16 |
| 3 | Draft Ava’s policy | POST /children/{id}/policies | policy a3147895…, draft |
| 4 | Generate from age | POST /policies/{id}/generate-from-age | 18 rules, PG-13, 180-min limit |
| 5 | Activate | POST /policies/{id}/activate | active, version 20 |
| 6 | Confirm ceilings | GET /children/{id}/age-ratings | Leo PG · Ava PG-13 |
Next steps
Change a rule and enforce it
Tighten one of these rules and push it to a connected platform — then read back what landed.
End-to-end walkthrough
Link two platforms to this family, unlink one, and prove per-service isolation.
Families & kids
The full family, child, and policy resource model behind these calls.
Strictness levels
How
recommended, strict, and relaxed shift limits — and why the rating ceiling follows age.