Principia Analytics API

Recommendation and value-of-information endpoints (POST)

GitHub OpenAPI

Operations 6

POST /api/v1/recommend Recommend predictor constructs / instruments for an intent #
POST /api/v1/voi Value-of-information (EVSI / EVPI / optimal-N) for one prior #
POST /api/v1/posterior Bayesian update — fuse a prior with an observation into a posterior #
GET /api/v1/decisions List canonical decision templates #
GET /api/v1/decisions/{id} Get one canonical decision template #
GET /api/v1/utility Translate effect context into utility parameters and optional dollar impact #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/peopleprincipia-com:peopleprincipia-com-analytics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

peopleprincipia-com-analytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Principia Registry Analytics API
  version: 0.1.0
  description: 'Read API for the **Principia** canonical registry of organizational-science

    measurement: constructs, instruments, survey items, citations, effect sizes,

    synthesized Bayesian priors, theoretical models, instrument equivalences,

    methodology critiques, and interventions.


    This document describes the **REST surface** (`/api/v1/*` + `/api/health`).

    Principia also exposes a **Model Context Protocol (MCP)** server at

    `POST /api/mcp` for AI agents — that surface is JSON-RPC, not REST, and is

    documented in `api-consumer-guide.md` (it is summarized here for discovery only).


    ## Conventions

    - All `/api/v1/*` responses are JSON with `Cache-Control: no-store`.

    - **List** endpoints return `{ "items": [...], "next_cursor": string | null }`.

    - **Single-entity** endpoints return `{ "entity": {...} }`.

    - **Errors** return `{ "error": { "code": string, "message": string } }`.

    - Pagination is opaque-cursor based: pass the previous response''s

    `next_cursor` back as `?cursor=`. `limit` is clamped to 1..500 (default 50).

    - Every authenticated response carries `X-RateLimit-Limit`,

    `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.

    - Every route answers errors with the one envelope above, including the

    first-party routes under `/api/free`, `/api/support`, `/api/hadl`,

    `/api/study-design` and `/api/workspace`, and an unknown path under `/api`

    (404 `not_found`). The MCP list tools page with the same `limit` and

    `cursor` names and answer `next_cursor`.


    ## Rate limits

    The numbers below are the ones the limiter enforces (counting: sliding

    window of the last 60 seconds; REST and MCP share one counter per consumer,

    and each MCP `tools/call` counts as one request).

    - Unkeyed (free researcher tier): **30 requests per 60 seconds** per client

    IP address; `limit` is capped at **5** rows per request; no `cursor`.

    - Keyed: **60 requests per 60 seconds** per key by default. A key can be

    issued a different rate; `X-RateLimit-Limit` on any response carries the

    rate that applies to the caller.

    - Feedback form (`POST /api/feedback/...`): **5 submissions per 600 seconds**

    per client IP address and entity.

    - `X-RateLimit-Reset` is an ISO 8601 UTC timestamp, not epoch seconds.

    - Exceeded: HTTP `429` with `Retry-After` in seconds.'
  contact:
    name: People Analyst / Principia
    url: https://peopleprincipia.com
servers:
- url: https://peopleprincipia.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Analytics
  description: Recommendation and value-of-information endpoints (POST)
paths:
  /api/v1/recommend:
    post:
      operationId: postRecommend
      x-codeSamples:
      - lang: Shell
        label: curl
        source: 'curl -s -X POST -H "Authorization: Bearer $PRINCIPIA_API_KEY" -H "Content-Type: application/json" -d ''{"intent":{"outcome_construct_id":"VAR_000405","free_text":"string","predicate_filter":"predicts"}}'' "https://peopleprincipia.com/api/v1/recommend"

          '
      tags:
      - Analytics
      summary: Recommend predictor constructs / instruments for an intent
      description: Read-only. GET → 405.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecommendRequest'
      responses:
        '200':
          $ref: '#/components/responses/Entity'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
  /api/v1/voi:
    post:
      operationId: postVoi
      x-codeSamples:
      - lang: Shell
        label: curl
        source: 'curl -s -X POST -H "Authorization: Bearer $PRINCIPIA_API_KEY" -H "Content-Type: application/json" -d ''{"loss_function":{"type":"string"}}'' "https://peopleprincipia.com/api/v1/voi"

          '
      tags:
      - Analytics
      summary: Value-of-information (EVSI / EVPI / optimal-N) for one prior
      description: Read-only. GET → 405. Returns a `delegation_hint` when the request needs the heavier toolbox voi-framework.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoIRequest'
      responses:
        '200':
          $ref: '#/components/responses/Entity'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
  /api/v1/posterior:
    post:
      operationId: postPosterior
      x-codeSamples:
      - lang: Shell
        label: curl
        source: 'curl -s -X POST -H "Authorization: Bearer $PRINCIPIA_API_KEY" -H "Content-Type: application/json" -d ''{"observation":{"value":1}}'' "https://peopleprincipia.com/api/v1/posterior"

          '
      tags:
      - Analytics
      summary: Bayesian update — fuse a prior with an observation into a posterior
      description: 'Read-only. GET → 405. Fuses a CanonicalPrior (published-literature prior) with a new

        observation (e.g. a primary-deployment effect size) into a posterior. Conjugate

        normal-normal update on the Fisher-z scale; `prior_basis` defaults to `predictive`

        (σ²+τ², the distribution of the true effect in a new setting). The fusion engine

        behind both decision use and the evidence network.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PosteriorRequest'
      responses:
        '200':
          $ref: '#/components/responses/Entity'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
  /api/v1/decisions:
    get:
      operationId: getDecisions
      x-codeSamples:
      - lang: Shell
        label: curl
        source: 'curl -s -H "Authorization: Bearer $PRINCIPIA_API_KEY" "https://peopleprincipia.com/api/v1/decisions?limit=5"

          '
      tags:
      - Analytics
      summary: List canonical decision templates
      description: 'Requires `Authorization: Bearer ` (read tier). Returns decision templates that seed AIE loops without rebuilding decision models from scratch.'
      parameters:
      - name: archetype
        in: query
        schema:
          type: string
          enum:
          - invest_in_development
          - hire
          - promote
          - restructure
          - change_hiring_process
        description: Optional decision archetype filter.
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
      - $ref: '#/components/parameters/cursor'
      responses:
        '200':
          $ref: '#/components/responses/List'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/v1/decisions/{id}:
    get:
      operationId: getDecisionsById
      x-codeSamples:
      - lang: Shell
        label: curl
        source: 'curl -s -H "Authorization: Bearer $PRINCIPIA_API_KEY" "https://peopleprincipia.com/api/v1/decisions/<id>"

          '
      tags:
      - Analytics
      summary: Get one canonical decision template
      description: 'Requires `Authorization: Bearer ` (read tier). Returns question, loss/value model, and variable resolution links for the decision.'
      parameters:
      - $ref: '#/components/parameters/idPath'
      responses:
        '200':
          $ref: '#/components/responses/Entity'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/utility:
    get:
      operationId: getUtility
      x-codeSamples:
      - lang: Shell
        label: curl
        source: 'curl -s -H "Authorization: Bearer $PRINCIPIA_API_KEY" "https://peopleprincipia.com/api/v1/utility"

          '
      tags:
      - Analytics
      summary: Translate effect context into utility parameters and optional dollar impact
      description: 'Requires `Authorization: Bearer ` (read tier). Provide `outcome_family` or `to`/`to_construct`; optional org inputs trigger Brogden-Cronbach-Gleser value computation.'
      parameters:
      - name: outcome_family
        in: query
        schema:
          type: string
          enum:
          - job_performance
          - turnover
          - absenteeism
          - unknown
      - name: to
        in: query
        schema:
          type: string
        description: Alias of to_construct for construct-based outcome classification.
      - name: to_construct
        in: query
        schema:
          type: string
      - name: job_complexity
        in: query
        schema:
          type: string
          enum:
          - low
          - medium
          - high
      - name: annual_salary
        in: query
        schema:
          type: number
      - name: n_employees
        in: query
        schema:
          type: number
      - name: tenure_years
        in: query
        schema:
          type: number
      - name: standardized_effect_d
        in: query
        schema:
          type: number
      - name: separation_rate_delta
        in: query
        schema:
          type: number
      responses:
        '200':
          $ref: '#/components/responses/Entity'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    BadRequest:
      description: Invalid request (validation, bad cursor, bad enum)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    MethodNotAllowed:
      description: Wrong HTTP method (these endpoints are POST-only)
      headers:
        Allow:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Entity:
      description: Single entity
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EntityEnvelope'
    List:
      description: Paginated list
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ListEnvelope'
    Unauthorized:
      description: Missing or invalid Bearer key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Entity not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    RefusalsWireUnavailable:
      type: object
      required:
      - count
      - note
      properties:
        count:
          type: 'null'
        note:
          type: string
    RefusalsWireClasses:
      type: object
      required:
      - grounding
      - unresolved_construct
      - instrument_facet
      - scope
      - do_not_mint
      - tombstone
      - curator_hold
      - grounding_basis
      - unresolved_construct_basis
      - instrument_facet_basis
      - scope_basis
      - do_not_mint_basis
      - tombstone_basis
      - curator_hold_basis
      properties:
        grounding:
          type: integer
          minimum: 0
        unresolved_construct:
          type: integer
          minimum: 0
        instrument_facet:
          type: integer
          minimum: 0
        scope:
          type: integer
          minimum: 0
        do_not_mint:
          type: integer
          minimum: 0
        tombstone:
          type: integer
          minimum: 0
        curator_hold:
          type: integer
          minimum: 0
        grounding_basis:
          $ref: '#/components/schemas/RefusalsWireBasis'
        unresolved_construct_basis:
          $ref: '#/components/schemas/RefusalsWireBasis'
        instrument_facet_basis:
          $ref: '#/components/schemas/RefusalsWireBasis'
        scope_basis:
          $ref: '#/components/schemas/RefusalsWireBasis'
        do_not_mint_basis:
          $ref: '#/components/schemas/RefusalsWireBasis'
        tombstone_basis:
          $ref: '#/components/schemas/RefusalsWireBasis'
        curator_hold_basis:
          $ref: '#/components/schemas/RefusalsWireBasis'
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              description: 'Stable machine code: unauthorized | forbidden | rate_limited | bad_request | not_found | bad_cursor | bad_predicate | bad_min_informativeness | bad_min_freshness_score | method_not_allowed | no_prior_synthesized | internal | store_unavailable'
            message:
              type: string
    EntityEnvelope:
      type: object
      required:
      - entity
      properties:
        entity:
          type: object
          additionalProperties: true
        _refusals:
          $ref: '#/components/schemas/RefusalsWireEnvelope'
    RecommendRequest:
      type: object
      required:
      - intent
      properties:
        intent:
          type: object
          properties:
            outcome_construct_id:
              type: string
            free_text:
              type: string
            predicate_filter:
              $ref: '#/components/schemas/Predicate'
            sample_context:
              type: object
              properties:
                culture:
                  type: string
                industry:
                  type: string
                level_of_analysis:
                  type: string
        top_k:
          type: integer
          default: 10
          maximum: 50
        min_informativeness:
          type: string
          enum:
          - weakly_informative
          - informative
          - highly_informative
    PosteriorRequest:
      type: object
      required:
      - observation
      description: Provide prior_id OR prior_tuple, plus an observation with either n (>3) or se.
      properties:
        prior_id:
          type: string
        prior_tuple:
          type: object
          properties:
            from:
              type: string
            predicate:
              $ref: '#/components/schemas/Predicate'
            to:
              type: string
        observation:
          type: object
          required:
          - value
          properties:
            value:
              type: number
              description: Observed correlation r in (-1, 1).
            n:
              type: integer
              description: Sample size (> 3) → Fisher-z sampling variance 1/(n-3).
            se:
              type: number
              description: Direct standard error on the r scale (alternative to n).
            source:
              type: string
              description: Provenance label, e.g. primary-deployment.
        prior_basis:
          type: string
          enum:
          - predictive
          - mean
          description: predictive (default) = σ²+τ² (true effect in a new setting); mean = σ² (uncertainty about the pooled mean).
    ListEnvelope:
      type: object
      required:
      - items
      - next_cursor
      properties:
        items:
          type: array
          items:
            type: object
            additionalProperties: true
        next_cursor:
          type:
          - string
          - 'null'
          description: Pass back as ?cursor= for the next page; null on the last page.
        _refusals:
          $ref: '#/components/schemas/RefusalsWireEnvelope'
        note:
          type: string
          description: PRN-448. Present when the route has something to say about HOW the list was produced (a fan-out hop, an unknown id). Mirrors the X-Principia-Note header, which is Latin-1-sanitised; the body carries the note verbatim.
    RefusalsWireEnvelope:
      description: PRN-388 — refusal rate per served answer, attached to every successful list/entity JSON response.
      oneOf:
      - $ref: '#/components/schemas/RefusalsWireBlock'
      - $ref: '#/components/schemas/RefusalsWireUnavailable'
    RefusalsWireBlock:
      type: object
      required:
      - count
      - count_basis
      - classes
      properties:
        count:
          type: integer
          minimum: 0
        count_basis:
          $ref: '#/components/schemas/RefusalsWireBasis'
        classes:
          $ref: '#/components/schemas/RefusalsWireClasses'
    RefusalsWireBasis:
      type: object
      required:
      - command
      - measured_at
      properties:
        command:
          type: string
        measured_at:
          type: string
    VoIRequest:
      type: object
      required:
      - loss_function
      description: Provide prior_id OR prior_tuple, and at least one of sample_design.n or (cost_per_observation + max_n).
      properties:
        prior_id:
          type: string
        prior_tuple:
          type: object
          properties:
            from:
              type: string
            predicate:
              $ref: '#/components/schemas/Predicate'
            to:
              type: string
        loss_function:
          oneOf:
          - type: object
            properties:
              type:
                const: squared_error
          - type: object
            properties:
              type:
                const: absolute_error
          - type: object
            required:
            - type
            - threshold
            - cost_above
            - cost_below
            properties:
              type:
                const: linear_decision
              threshold:
                type: number
              cost_above:
                type: number
              cost_below:
                type: number
        sample_design:
          type: object
          properties:
            n:
              type: integer
            measurement_sigma:
              type: number
        cost_per_observation:
          type: number
        max_n:
          type: integer
        seed:
          type: integer
    Predicate:
      type: string
      enum:
      - predicts
      - moderates
      - mediates
      - correlates
      - causes
  parameters:
    idPath:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Entity identifier.
    cursor:
      name: cursor
      in: query
      schema:
        type: string
      description: Opaque pagination cursor from a prior response's next_cursor.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer <key>`. Keys are provisioned per consumer via

        `PRINCIPIA_KEY_*` environment variables and map to a named consumer

        (`toolbox`, `pa-site`, `internal`, `toolbox-reincarnation`) with a scope

        set. Default scope is `read:public`; `read:internal` and

        `write:deployment_evidence` gate specific endpoints.

        '