Skip to main content
POST
/
children
/
{childID}
/
enforce
SDK (@phosra/sdk)
import { PhosraClient } from "@phosra/sdk";

const phosra = new PhosraClient({
  baseUrl: "https://phosra-api-sandbox-production.up.railway.app/api/v1",
  accessToken: process.env.PHOSRA_API_KEY,
});

const result = await phosra.enforcement.trigger("a11ce0fa-0000-4000-8000-0000000000a1");
console.log(result);
{
  "id": "cf476742-4715-473c-bfac-64d39571ae5c",
  "child_id": "ca02f5d1-fee8-4201-b5ca-fdc8be506e1e",
  "policy_id": "7b3e9c04-2d1a-4f68-9e5b-8c07a1f34d29",
  "trigger_type": "manual",
  "status": "running",
  "started_at": "2026-07-06T04:26:01.337741754Z",
  "created_at": "2026-07-06T04:26:01.337745101Z"
}
Enforcement pushes a child’s active policy out to every connected platform and returns a job you can poll. Trigger it, then watch the job and inspect per-platform results.
curl -X POST https://phosra-api-sandbox-production.up.railway.app/api/v1/children/$CHILD_ID/enforce \
  -H "Authorization: Bearer $PHOSRA_API_KEY"
The write confirms the job was queued — it does not guarantee every platform applied the rule. Track completion with Get enforcement job status and per-platform outcomes with Get job results.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

childID
string<uuid>
required

Body

application/json
platform_ids
string[]

Optional list of platform IDs to target. If omitted, pushes to ALL connected platforms.

Response

Enforcement job started

id
string<uuid>

Unique identifier for this resource.

child_id
string<uuid>

Identifier of the child this resource belongs to.

policy_id
string<uuid>

Identifier of the policy this resource belongs to.

trigger_type
enum<string>

What initiated the job (e.g. manual, scheduled, policy_change).

Available options:
manual,
auto,
webhook
status
enum<string>

Current lifecycle state of the resource.

Available options:
pending,
running,
completed,
failed,
partial
started_at
string<date-time> | null

RFC 3339 timestamp of when the job started running.

completed_at
string<date-time> | null

RFC 3339 timestamp of when the job finished.

created_at
string<date-time>

RFC 3339 timestamp of when the resource was created.