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

# Get the structure and weights a review item was decided with

> Returns the structure and weights the item's evaluation was decided with: the full structure and weights hashes, each feature as authored (name, prompt, answer type, guidance, criteria) in authored order with its weight in the score's combine, and the cut points with their outcomes, lowest first. Never the evaluation's answers, score, contributions, outcome or summary. Available once a spot check is answered: a blind item that is open, skipped, unsure or expired is 409, and a withdrawn answer stays answered. Non-blind items answer in any state. Another reviewer's or environment's item is 404.



## OpenAPI

````yaml /openapi.json get /v1/review/items/{item_id}/configuration
openapi: 3.1.0
info:
  title: Moonbounce Decisions API
  version: 0.0.0
  description: >-
    Moonbounce decisions: evaluate items against a decision spec (features
    combined by aggregators), record feedback and seed examples, review a ranked
    queue, and improve the spec through suggestions that ship as code diffs,
    each with a preview (backtest) and an evidence label.


    **Authentication.** Send an API key as `Authorization: Bearer <key>` on
    every operation except `GET /health` and `POST /v1/specs/hash`. Call the API
    from a server, never a browser: a key must not reach one, and the API sends
    no CORS headers. A key belongs to one organization and one environment:
    production, or test for a key with the `env:test` permission. Test traffic
    never counts as production traffic.


    **Requests.** JSON bodies (`Content-Type: application/json`) of at most 1
    MB, parsed strictly: duplicate keys, lone surrogates, integers outside
    ±(2^53 - 1), `__proto__` keys, U+0000 and nesting deeper than 64 are a 400.


    **Retries.** Send an `Idempotency-Key` on every POST under /v1 that takes
    one (all but `POST /v1/specs/hash`). Keep it for the request's retries. The
    same key with the same request returns the first stored result, marked
    `Idempotent-Replayed: true`, for 24 hours (410 if that result was since
    deleted); with another request it is 422 IDEMPOTENCY_KEY_REUSED. Keys are
    scoped to the organization and environment across every operation, so use a
    fresh key per request. A request that failed before its result was stored
    runs again when retried. 429 and 503 under /v1 may carry `Retry-After`
    (seconds); a daily QUOTA_EXCEEDED cap instead names its reset time.


    **Errors.** Every error under /v1 is `{"error": {"type", "message",
    "reason"?, "param"?, "details"?}}` (ErrorBody); `GET /health` answers its
    own shape. Every response carries a `Request-Id` header. Rate limits apply
    per key and per client IP, counted per Cloudflare location.
servers:
  - url: https://api.moonbounce.ai
    description: Production
security: []
paths:
  /v1/review/items/{item_id}/configuration:
    get:
      tags:
        - review
      summary: Get the structure and weights a review item was decided with
      description: >-
        Returns the structure and weights the item's evaluation was decided
        with: the full structure and weights hashes, each feature as authored
        (name, prompt, answer type, guidance, criteria) in authored order with
        its weight in the score's combine, and the cut points with their
        outcomes, lowest first. Never the evaluation's answers, score,
        contributions, outcome or summary. Available once a spot check is
        answered: a blind item that is open, skipped, unsure or expired is 409,
        and a withdrawn answer stays answered. Non-blind items answer in any
        state. Another reviewer's or environment's item is 404.
      operationId: getReviewItemConfiguration
      parameters:
        - schema:
            type: string
            pattern: >-
              ^inb_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
            description: The review item’s id (inb_…), not your own item_id.
          required: true
          description: The review item’s id (inb_…), not your own item_id.
          name: item_id
          in: path
      responses:
        '200':
          description: The configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewItemConfiguration'
        '400':
          description: 'Invalid request: `param` names the field at fault when one applies'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '401':
          description: Missing or invalid API key (reason KEY_INVALID)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '403':
          description: The key may not do this
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '404':
          description: Not found, or not in this key's organization and environment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '409':
          description: Conflict with the current state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '429':
          description: >-
            RATE_LIMITED: retry after Retry-After seconds; QUOTA_EXCEEDED:
            details.reset_at gives the daily reset time (no Retry-After), or
            details.too_large asks for a smaller request
          headers:
            Retry-After:
              schema:
                type: string
                description: Seconds to wait before retrying, when waiting helps.
              required: false
              description: Seconds to wait before retrying, when waiting helps.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '503':
          description: >-
            Temporarily unavailable, with Retry-After (for example reason
            AUTH_UNAVAILABLE, ENGINE_UNAVAILABLE or STORE_UNAVAILABLE): retry
            with the same Idempotency-Key
          headers:
            Retry-After:
              schema:
                type: string
                description: Seconds to wait before retrying, when waiting helps.
              required: true
              description: Seconds to wait before retrying, when waiting helps.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
        - bearerAuth:
            - decisions:develop
components:
  schemas:
    ReviewItemConfiguration:
      type: object
      properties:
        environment:
          $ref: '#/components/schemas/Environment'
        item_id:
          $ref: '#/components/schemas/InbId'
        decision_id:
          $ref: '#/components/schemas/DecisionId'
        structure_hash:
          type: string
          pattern: ^sha256:[0-9a-f]{64}$
          description: The evaluated structure's full hash.
        weights_hash:
          type: string
          pattern: ^sha256:[0-9a-f]{64}$
          description: The evaluated weights version's full hash.
        features:
          type: array
          items:
            $ref: '#/components/schemas/ReviewConfigurationFeature'
          description: >-
            The structure's features in authored order (the same order as the
            item's `features`).
        below:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,63}$
          description: The outcome under the first cut, as on the item.
        cuts:
          type: array
          items:
            type: object
            properties:
              at:
                type: number
              outcome:
                $ref: '#/components/schemas/Name'
            required:
              - at
              - outcome
            additionalProperties: false
          minItems: 1
          description: >-
            The evaluation's cut points, ascending, each with the outcome at or
            above it, as on the item.
      required:
        - environment
        - item_id
        - decision_id
        - structure_hash
        - weights_hash
        - features
      additionalProperties: false
      description: >-
        The structure and weights a review item's evaluation was decided with.
        `below` and `cuts` are omitted when the evaluation had no cut points.
    ErrorBody:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              $ref: '#/components/schemas/ErrorType'
            reason:
              type: string
              pattern: ^[A-Z][A-Z0-9_]+$
              description: >-
                Set where a caller can act on it, one of the reasons in the
                ErrorReason schema. New reasons may be added: treat an unknown
                one by the status and `type`.
            message:
              type: string
              description: For people; don't parse it.
            param:
              type: string
              description: >-
                The request field at fault, as a dotted path (`subject.0.text`,
                `claims.1.value`).
            details:
              type: object
              additionalProperties: {}
          required:
            - type
            - message
          additionalProperties: false
      required:
        - error
      additionalProperties: false
    Environment:
      type: string
      enum:
        - production
        - test
      description: >-
        The environment of the key that made the call: `production` or `test`.
        Evaluations, feedback, reviews and suggestions are separate per
        environment; registered structures are shared.
    InbId:
      type: string
      pattern: >-
        ^inb_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
    DecisionId:
      type: string
      pattern: ^[a-z][a-z0-9_.-]{0,127}$
    ReviewConfigurationFeature:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/Name'
        type:
          type: string
          enum:
            - boolean
          description: >-
            How the feature is answered: `boolean` is a yes or no question,
            answered as P(yes).
        prompt:
          type: string
          description: The authored question the engine answers about the content.
        guidance:
          type: string
          description: The feature's own background, as authored.
        criteria:
          type: object
          properties:
            'true':
              type: string
            'false':
              type: string
          additionalProperties: false
          description: What counts as yes and as no, as authored.
        effect:
          type: string
          enum:
            - raises
            - lowers
          description: >-
            Direction, for a direct term of the score's combine (or a leaf
            behind a calibrate term): a yes raises or lowers the score.
        weight:
          type: number
          description: >-
            The term's signed weight in the score's combine: the combine's fixed
            numbers, else the evaluation's weights version. A leaf behind a
            calibrate node that is a direct term carries that calibrate term's
            weight. Omitted for a feature that is not a direct weighted term of
            that combine.
        via:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,63}$
          description: >-
            For a feature that is not a direct term of the score's combine: the
            nested combine it is weighted inside (the first one the score reads
            that has it as a term, directly or through a calibrate node).
            Omitted for a direct term (including one behind a calibrate term),
            and for a feature the score does not read at all.
      required:
        - name
        - type
        - prompt
      additionalProperties: false
    Name:
      type: string
      pattern: ^[a-z][a-z0-9_]{0,63}$
    ErrorType:
      type: string
      enum:
        - invalid_request
        - authentication
        - permission_denied
        - not_found
        - conflict
        - rate_limited
        - engine_failed
        - unavailable
        - internal
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key, sent as `Authorization: Bearer <key>`. Each operation lists
        the scope its key needs: `decisions:evaluate` (evaluate and read
        evaluations), `decisions:feedback` (your app's feedback) or
        `decisions:develop` (everything else, including owner feedback and the
        review queue). An operation listing no scope takes any scoped key. A key
        with no scope, or without the operation's, gets 403 INSUFFICIENT_SCOPE.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.