> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phosra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Complete reference for all Phosra API endpoints

<Note>
  This section documents **Phosra's own Parental Controls product** — the families, children, policies, and enforcement API that Phosra has built on the platform. It is one product built on top of the OCSS-conformant control plane, not the control plane itself. If you are building a third-party tool, agent, or enforcement partner integration, start with the [Developer Platform](/platform/overview) instead.
</Note>

The Phosra API provides 66 endpoints organized into the following groups. All endpoints use the base URL `https://prodapi.phosra.com/api/v1` (or `https://phosra-api-sandbox-production.up.railway.app/api/v1` for the hosted sandbox). Every group below links to a live, per-endpoint reference.

## Endpoint Groups

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api-reference/auth/get-auth-me">
    Authenticate with a WorkOS token or a developer API key.
    2 endpoints
  </Card>

  <Card title="Families" icon="users" href="/api-reference/families/get-families">
    Create and manage family groups and their members.
    8 endpoints
  </Card>

  <Card title="Children" icon="child" href="/api-reference/children/get-families-children">
    Add children to families, manage profiles, and get age ratings.
    6 endpoints
  </Card>

  <Card title="Policies" icon="shield" href="/api-reference/policies/get-children-policies">
    Create, activate, pause, and auto-generate safety policies.
    8 endpoints
  </Card>

  <Card title="Rules" icon="list-check" href="/api-reference/rules/list-policy-rules">
    Manage individual rules across the 123 OCSS safety categories (the closed OCSS v4 vocabulary).
    5 endpoints
  </Card>

  <Card title="Enforcement" icon="rocket" href="/api-reference/enforcement/post-children-enforce">
    Push policies to platforms and track enforcement jobs.
    5 endpoints
  </Card>

  <Card title="Platforms" icon="puzzle-piece" href="/api-reference/platforms/get-platforms">
    Browse and filter supported integration platforms.
    6 endpoints
  </Card>

  <Card title="Compliance" icon="link" href="/api-reference/compliance/post-compliance">
    Connect, verify, and manage platform connections.
    5 endpoints
  </Card>

  <Card title="Webhooks" icon="bell" href="/api-reference/webhooks/post-webhooks">
    Register webhook endpoints for real-time event notifications.
    7 endpoints
  </Card>

  <Card title="Standards" icon="certificate" href="/api-reference/standards/get-standards">
    Browse and adopt community safety standards.
    5 endpoints
  </Card>

  <Card title="Ratings" icon="star" href="/api-reference/ratings/get-ratings-systems">
    Content rating systems (MPAA, ESRB, PEGI, CSM, TVPG) and age lookups.
    5 endpoints
  </Card>

  <Card title="Devices" icon="mobile" href="/api-reference/devices/post-children-devices">
    Register Apple devices and manage on-device enforcement.
    4 endpoints
  </Card>
</CardGroup>

## Authentication

Most endpoints require authentication via Bearer token or API key. See the [Authentication guide](/authentication) for details. Public endpoints (platforms, ratings, standards) are marked with `security: []` in the OpenAPI spec.

## Response Format

All responses return JSON. Successful responses return the resource directly. Error responses follow the format:

```json theme={null}
{
  "error": "error_code",
  "message": "Human-readable description"
}
```

See the [Errors page](/errors) for details on status codes and error handling.

## OpenAPI Spec

The machine-readable specification is served live from the Go API, versioned with the binary:

<CardGroup cols={2}>
  <Card title="OpenAPI JSON" icon="brackets-curly" href="https://prodapi.phosra.com/openapi.json">
    `https://prodapi.phosra.com/openapi.json` — canonical spec, import into any OpenAPI 3.1 tool.
  </Card>

  <Card title="OpenAPI YAML" icon="file-code" href="https://prodapi.phosra.com/openapi.yaml">
    `https://prodapi.phosra.com/openapi.yaml` — same spec, YAML form.
  </Card>

  <Card title="Postman / Insomnia collection" icon="download" href="/tools/postman">
    A ready-to-run collection (93 requests, 20 folders) pre-wired to the hosted sandbox — download,
    import, and press **Send**.
  </Card>

  <Card title="llms.txt" icon="robot" href="https://docs.phosra.com/llms.txt">
    [`llms.txt`](https://docs.phosra.com/llms.txt) and
    [`llms-full.txt`](https://docs.phosra.com/llms-full.txt) for LLM-friendly consumption.
  </Card>
</CardGroup>

The sandbox serves the identical spec at
[`https://phosra-api-sandbox-production.up.railway.app/openapi.json`](https://phosra-api-sandbox-production.up.railway.app/openapi.json).
The in-repo copy at `/openapi.yaml` is kept in sync and is suitable for local `mint dev` rendering.
