> ## 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.

# Change your own earlier review answer

> Changes your own earlier answer on an item, at any time: the new answer supersedes your last one, and the original is kept as history. On a spot check your first, blind answer still measures Moonbounce's accuracy; the change is marked as made after the reveal. Send the current chain head as feedback_id (from handled.feedback_id) and claims as on submit. Moonbounce's call is revealed by now, so a verdict is allowed and disagreeing with it needs a `reason` (400, param reason). A stale head, or an item that is withdrawn, skipped, unsure, expired or unanswered, is 409; another reviewer's or environment's item is 404. Returns the item with handled reflecting the new answer. Undo's 10-minute window still runs from the original answer and withdraws the answer with its changes.



## OpenAPI

````yaml /openapi.json post /v1/review/items/{item_id}/change
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}/change:
    post:
      tags:
        - review
      summary: Change your own earlier review answer
      description: >-
        Changes your own earlier answer on an item, at any time: the new answer
        supersedes your last one, and the original is kept as history. On a spot
        check your first, blind answer still measures Moonbounce's accuracy; the
        change is marked as made after the reveal. Send the current chain head
        as feedback_id (from handled.feedback_id) and claims as on submit.
        Moonbounce's call is revealed by now, so a verdict is allowed and
        disagreeing with it needs a `reason` (400, param reason). A stale head,
        or an item that is withdrawn, skipped, unsure, expired or unanswered, is
        409; another reviewer's or environment's item is 404. Returns the item
        with handled reflecting the new answer. Undo's 10-minute window still
        runs from the original answer and withdraws the answer with its changes.
      operationId: changeReview
      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
        - schema:
            type: string
            minLength: 1
            maxLength: 255
            pattern: ^[\x20-\x7e]+$
            description: >-
              Makes a retry safe. For 24 hours, the same key with the same
              request returns the first stored result (with Idempotent-Replayed:
              true); the same key with a different request is a 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 with its key.
          required: false
          description: >-
            Makes a retry safe. For 24 hours, the same key with the same request
            returns the first stored result (with Idempotent-Replayed: true);
            the same key with a different request is a 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 with its key.
          name: idempotency-key
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReviewChange'
      responses:
        '200':
          description: Changed
          headers:
            Idempotent-Replayed:
              schema:
                type: string
                enum:
                  - 'true'
                description: >-
                  Present and `true` when this is the stored result of an
                  earlier request with the same Idempotency-Key.
              required: false
              description: >-
                Present and `true` when this is the stored result of an earlier
                request with the same Idempotency-Key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReviewChangeResponse'
        '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'
        '410':
          description: >-
            The Idempotency-Key's first result was deleted, so it cannot be
            replayed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '422':
          description: >-
            The request is well formed but cannot be processed (for example
            reason IDEMPOTENCY_KEY_REUSED)
          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:
    ReviewChange:
      type: object
      properties:
        feedback_id:
          $ref: '#/components/schemas/FbkId'
        claims:
          type: array
          items:
            $ref: '#/components/schemas/Claim'
          minItems: 1
          maxItems: 65
        reason:
          type: string
          maxLength: 4000
      required:
        - feedback_id
        - claims
      additionalProperties: false
    ReviewChangeResponse:
      type: object
      properties:
        environment:
          $ref: '#/components/schemas/Environment'
        item:
          $ref: '#/components/schemas/ReviewItem'
      required:
        - environment
        - item
      additionalProperties: false
    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
    FbkId:
      type: string
      pattern: >-
        ^fbk_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
    Claim:
      oneOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - target
            value:
              type: boolean
              description: Whether the spec's target statement is true of this item.
          required:
            - kind
            - value
          additionalProperties: false
          description: >-
            Whether the target statement is true. Only for specs that declare a
            target.
        - type: object
          properties:
            kind:
              type: string
              enum:
                - outcome
            value:
              type: string
              minLength: 1
              maxLength: 64
              description: >-
                The right outcome: one of this evaluation's outcomes (`below` or
                a cut's outcome); an `abstain` name counts only where it reuses
                one of them.
          required:
            - kind
            - value
          additionalProperties: false
          description: >-
            The outcome this item should have had. On a cut score, the lowest
            outcome also says the target is false and the highest says it is
            true; middle outcomes say nothing about the target.
        - type: object
          properties:
            kind:
              type: string
              enum:
                - verdict
            value:
              type: string
              enum:
                - approve
                - reject
              description: 'approve: the shown outcome was right. reject: it was wrong.'
          required:
            - kind
            - value
          additionalProperties: false
          description: >-
            Approve or reject the outcome that was shown. Needs
            `about.evaluation_id`, and an evaluation whose outcome was shown to
            someone: primary traffic that decided (it has a score). An
            evaluation that abstained has only a fallback outcome, whatever it
            is called.
        - type: object
          properties:
            kind:
              type: string
              enum:
                - feature
            feature:
              type: string
              minLength: 1
              maxLength: 64
              description: A boolean feature of the evaluation's spec.
            value:
              type: boolean
              description: What the feature's answer should have been.
          required:
            - kind
            - feature
            - value
          additionalProperties: false
          description: >-
            The expected answer of one boolean feature. It is stored against
            that feature's prompt as it was judged, so a reworded prompt does
            not inherit it.
        - type: object
          properties:
            kind:
              type: string
              enum:
                - input_broken
            problem:
              type: string
              enum:
                - truncated
                - wrong_language
                - bad_extraction
                - unreadable
                - other
          required:
            - kind
            - problem
          additionalProperties: false
          description: >-
            The content could not be judged. The evaluation is kept out of fits
            and previews.
        - type: object
          properties:
            kind:
              type: string
              enum:
                - action
            value:
              type: string
              minLength: 1
              maxLength: 128
              description: >-
                What your app did, in your own words (for example
                `auto_approved`).
            logic_version:
              type: string
              maxLength: 128
              description: Which version of your own logic acted.
          required:
            - kind
            - value
          additionalProperties: false
          description: >-
            What your app did with the outcome. Observed behavior, not a
            statement of what is true.
    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.
    ReviewItem:
      type: object
      properties:
        environment:
          $ref: '#/components/schemas/Environment'
        id:
          $ref: '#/components/schemas/InbId'
        decision_id:
          $ref: '#/components/schemas/DecisionId'
        decision_title:
          type: string
        decision_index:
          type: integer
          minimum: 0
        evaluation_id:
          $ref: '#/components/schemas/EvlId'
        version:
          type: object
          properties:
            structure:
              $ref: '#/components/schemas/VersionHash'
            weights:
              $ref: '#/components/schemas/VersionHash'
          required:
            - structure
            - weights
          additionalProperties: false
        lane:
          $ref: '#/components/schemas/ReviewLane'
        reason:
          type: object
          properties:
            tag:
              $ref: '#/components/schemas/ReviewReasonTag'
            text:
              type: string
          required:
            - tag
            - text
          additionalProperties: false
        tags:
          type: array
          items:
            $ref: '#/components/schemas/ReviewReasonTag'
          minItems: 1
        guidance:
          type: string
        blind:
          type: boolean
        rank:
          type: number
        queued_at:
          $ref: '#/components/schemas/Timestamp'
        shown_at:
          $ref: '#/components/schemas/Timestamp'
        content:
          anyOf:
            - $ref: '#/components/schemas/ReviewContent'
            - type: 'null'
        sensitive:
          type: boolean
        summary:
          type: string
        target:
          type: string
        outcome_choices:
          type: array
          items:
            $ref: '#/components/schemas/OutcomeChoice'
        cuts:
          type: array
          items:
            type: object
            properties:
              at:
                type: number
              outcome:
                $ref: '#/components/schemas/Name'
            required:
              - at
              - outcome
            additionalProperties: false
          minItems: 1
        below:
          $ref: '#/components/schemas/Name'
        features:
          type: array
          items:
            $ref: '#/components/schemas/ReviewFeature'
        prediction:
          $ref: '#/components/schemas/ReviewPrediction'
        handled:
          $ref: '#/components/schemas/ReviewHandled'
      required:
        - environment
        - id
        - decision_id
        - evaluation_id
        - lane
        - reason
        - tags
        - blind
        - rank
        - queued_at
        - content
        - sensitive
        - outcome_choices
        - features
      additionalProperties: false
    ErrorType:
      type: string
      enum:
        - invalid_request
        - authentication
        - permission_denied
        - not_found
        - conflict
        - rate_limited
        - engine_failed
        - unavailable
        - internal
    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}$
    EvlId:
      type: string
      pattern: >-
        ^evl_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
    VersionHash:
      type: string
      pattern: ^sha256:[0-9a-f]{64}$
    ReviewLane:
      type: string
      enum:
        - active
        - random
    ReviewReasonTag:
      type: string
      enum:
        - uncertain
        - novel
        - spot_check
        - near_cut
    Timestamp:
      type: string
      format: date-time
    ReviewContent:
      type: object
      properties:
        subject:
          type: array
          items:
            $ref: '#/components/schemas/ContentPart'
        context:
          type: array
          items:
            $ref: '#/components/schemas/ContentPart'
      required:
        - subject
      additionalProperties: false
    OutcomeChoice:
      type: object
      properties:
        outcome:
          $ref: '#/components/schemas/Name'
        display:
          type: string
      required:
        - outcome
      additionalProperties: false
    Name:
      type: string
      pattern: ^[a-z][a-z0-9_]{0,63}$
    ReviewFeature:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/Name'
        node_hash:
          $ref: '#/components/schemas/VersionHash'
        prompt:
          type: string
        effect:
          type: string
          enum:
            - raises
            - lowers
        guidance:
          type: string
        criteria:
          type: object
          properties:
            'true':
              type: string
            'false':
              type: string
          additionalProperties: false
      required:
        - name
        - node_hash
        - prompt
      additionalProperties: false
    ReviewPrediction:
      type: object
      properties:
        score:
          type: number
        outcome:
          $ref: '#/components/schemas/Name'
        features:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ReviewLeafValue'
        contributions:
          type: object
          additionalProperties:
            type: number
      required:
        - features
      additionalProperties: false
    ReviewHandled:
      type: object
      properties:
        state:
          type: string
          enum:
            - confirmed
            - changed
            - answered
            - unsure
            - skipped
            - expired
            - withdrawn
        at:
          $ref: '#/components/schemas/Timestamp'
        feedback_id:
          $ref: '#/components/schemas/FbkId'
        changed_at:
          $ref: '#/components/schemas/Timestamp'
        outcome:
          $ref: '#/components/schemas/Name'
        target:
          type: boolean
        matched:
          type: boolean
      required:
        - state
        - at
      additionalProperties: false
    ContentPart:
      oneOf:
        - $ref: '#/components/schemas/TextPart'
        - $ref: '#/components/schemas/JsonPart'
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/TextPart'
          json: '#/components/schemas/JsonPart'
    ReviewLeafValue:
      anyOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - boolean
            value:
              type: number
              minimum: 0
              maximum: 1
          required:
            - type
            - value
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              enum:
                - boolean
            abstained:
              type: boolean
              enum:
                - true
            reason:
              type: string
          required:
            - type
            - abstained
          additionalProperties: false
        - type: object
          properties:
            type:
              type: string
              enum:
                - boolean
            failed:
              type: boolean
              enum:
                - true
            reason:
              type: string
          required:
            - type
            - failed
          additionalProperties: false
    TextPart:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        text:
          type: string
          minLength: 1
        name:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,63}$
          description: >-
            Names the part, so a feature's `inputs` can pick it. In `subject`,
            avoid "context" when the request also sends `context`.
        sensitive:
          type: boolean
          description: >-
            Display policy only: reviewers see the part blurred or behind a
            link. The engine still reads it and it is stored like any other
            part.
      required:
        - type
        - text
      additionalProperties: false
    JsonPart:
      type: object
      properties:
        type:
          type: string
          enum:
            - json
        data:
          anyOf:
            - type: object
              additionalProperties: {}
            - type: array
              items: {}
        name:
          type: string
          pattern: ^[a-z][a-z0-9_]{0,63}$
          description: >-
            Names the part, so a feature's `inputs` can pick it. In `subject`,
            avoid "context" when the request also sends `context`.
        sensitive:
          type: boolean
          description: >-
            Display policy only: reviewers see the part blurred or behind a
            link. The engine still reads it and it is stored like any other
            part.
      required:
        - type
        - data
      additionalProperties: false
  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.