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

# Update dataset review item

> Approve, edit, remove, reopen, comment, or record a field-decision or file-decision on one review item while the parent request is draft, open, or paused. Pass `expectedUpdatedAt` from the item the client last observed. Pass `fieldPath` with `action: comment` or `action: field-decision`, `filePath` with `action: file-decision`. `action: edit-file` is multipart-only: send `file` bytes with `filePath` (correct an existing expected file) or `newPath` (upload a brand-new expected file) plus `expectedUpdatedAt`.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/automations/{id}/dataset-review-requests/{reviewId}/items/{itemId}
openapi: 3.1.0
info:
  title: EigenPal API
  version: 1.0.0
  description: >-
    Public REST API for inspecting automations, starting and monitoring runs,
    managing files, collecting human reviews, and running evaluations.
  contact:
    name: Eigenpal
    url: https://eigenpal.com
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: https://api.eigenpal.com
    description: Production (canonical API hostname)
security:
  - bearerAuth: []
tags:
  - name: Metadata
    description: Authenticate and inspect the current API context.
  - name: Models
    description: >-
      List text, vision, and OCR models configured for the current tenant
      environment. This is a catalog inventory, not a live provider health
      probe.
  - name: Automations
    description: >-
      Inspect runnable workflow and agent automations, their versions, triggers,
      and source sync state. Move YAML workflows between folders and delete
      automations.
  - name: Folders
    description: >-
      Create and organize workflow and template folders. Deleting a folder
      unfiles contained workflows or templates and does not delete them.
  - name: Runs
    description: >-
      Start, monitor, retry, review, and debug automation runs, including
      artifacts.
  - name: Reviews
    description: >-
      Record human review verdicts, manage corrected outputs, and monitor review
      health.
  - name: Files
    description: Upload reusable files for later run or dataset use.
  - name: Templates
    description: >-
      Upload, inspect, version, download, and delete tenant-scoped DOCX and XLSX
      templates.
  - name: Email servers
    description: >-
      Create and manage outbound email servers for workflow mail. Secrets are
      encrypted at rest and never returned.
  - name: Evaluation
    description: >-
      Manage datasets, examples, evaluators, experiment batches, evaluator
      scores, and run promotion workflows.
paths:
  /v1/automations/{id}/dataset-review-requests/{reviewId}/items/{itemId}:
    patch:
      tags:
        - Evaluation
      summary: Update dataset review item
      description: >-
        Approve, edit, remove, reopen, comment, or record a field-decision or
        file-decision on one review item while the parent request is draft,
        open, or paused. Pass `expectedUpdatedAt` from the item the client last
        observed. Pass `fieldPath` with `action: comment` or `action:
        field-decision`, `filePath` with `action: file-decision`. `action:
        edit-file` is multipart-only: send `file` bytes with `filePath` (correct
        an existing expected file) or `newPath` (upload a brand-new expected
        file) plus `expectedUpdatedAt`.
      operationId: automations.datasetReviewRequests.updateItem
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: Automation id or typed alias.
          required: true
          description: Automation id or typed alias.
        - in: path
          name: reviewId
          schema:
            type: string
            description: Dataset review request id.
          required: true
          description: Dataset review request id.
        - in: path
          name: itemId
          schema:
            type: string
            description: Dataset review item id.
          required: true
          description: Dataset review item id.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDatasetReviewItem'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/EditDatasetReviewItemFile'
      responses:
        '200':
          description: Updated review item.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetReviewItemResponse'
        '400':
          description: Validation error. Request shape did not match the spec.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '403':
          description: API key lacks required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '413':
          description: Payload too large. Upload exceeded the per-request size cap.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '429':
          description: Rate limit exceeded
          headers:
            Retry-After:
              description: Seconds until the next request may succeed
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '503':
          description: >-
            Rate-limit accounting is temporarily unavailable. The request was
            not processed; retry.
          headers:
            Retry-After:
              description: Seconds until the next request may succeed
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
components:
  schemas:
    UpdateDatasetReviewItem:
      type: object
      properties:
        action:
          type: string
          enum:
            - approve
            - edit
            - remove
            - reopen
            - comment
            - field-decision
            - file-decision
            - edit-file
          description: >-
            file-decision records a per-expected-file approve/remove (or a
            note). edit-file uploads corrected bytes and is multipart-only; JSON
            callers get a 400 pointing at the multipart form.
        expected: {}
        comment:
          type:
            - string
            - 'null'
        fieldPath:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        filePath:
          description: Expected-file path for action file-decision.
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        decision:
          anyOf:
            - type: string
              enum:
                - approved
                - removed
            - type: 'null'
        expectedUpdatedAt:
          type: string
          minLength: 1
          description: >-
            ISO timestamp of the item `updatedAt` the client last observed.
            Required for optimistic concurrency.
      required:
        - action
        - expectedUpdatedAt
    EditDatasetReviewItemFile:
      type: object
      properties:
        action:
          description: Must be edit-file for the multipart item PATCH form.
          type: string
          const: edit-file
        file:
          description: Corrected expected-file bytes (50MB cap).
          format: binary
          type: string
        filePath:
          type: string
          minLength: 1
        newPath:
          type: string
          minLength: 1
        comment:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        expectedUpdatedAt:
          type: string
          minLength: 1
      required:
        - expectedUpdatedAt
    DatasetReviewItemResponse:
      type: object
      properties:
        item:
          $ref: '#/components/schemas/DatasetReviewItem'
      required:
        - item
      additionalProperties: false
    ApiErrorEnvelope:
      type: object
      properties:
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ApiErrorIssue'
        requestId:
          type: string
          description: Request id echoed via the x-request-id header
        hint:
          description: Suggested fix for known error patterns
          type: string
        docsUrl:
          description: Link to relevant docs
          type: string
        conflictingWorkflowId:
          description: >-
            Present on 409 workflow_name_conflict responses. Id of the workflow
            that already owns the requested name.
          type: string
      required:
        - issues
        - requestId
      additionalProperties: false
    DatasetReviewItem:
      type: object
      properties:
        id:
          type: string
        reviewId:
          type: string
        exampleName:
          type: string
        snapshotInputJson:
          anyOf:
            - type: object
              propertyNames:
                type: string
              additionalProperties: {}
            - type: 'null'
        snapshotExpectedJson:
          anyOf:
            - {}
            - type: 'null'
        snapshotManifest:
          type: object
          properties:
            expectedFiles:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                required:
                  - name
                additionalProperties: false
            metadata:
              anyOf:
                - type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                - type: 'null'
            inputFileHashes:
              type: array
              items:
                type: object
                properties:
                  path:
                    type: string
                  sha256:
                    type: string
                required:
                  - path
                  - sha256
                additionalProperties: false
          required:
            - expectedFiles
            - metadata
          additionalProperties: false
        status:
          type: string
          enum:
            - pending
            - approved
            - edited
            - removed
        currentExpectedJson:
          anyOf:
            - {}
            - type: 'null'
        fieldDecisions:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/DatasetReviewFieldDecision'
        currentExpectedFiles:
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/DatasetReviewExpectedFile'
            - type: 'null'
          description: >-
            Overlay of the snapshot manifest expected files. Null means
            pristine: the reviewer has not corrected or uploaded any file yet.
        fileDecisions:
          type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/DatasetReviewFileDecision'
          description: >-
            Durable per-expected-file approve/remove, keyed by expected-file
            path.
        inputDrifted:
          type: boolean
          description: >-
            True when live dataset input-file bytes no longer match the hashes
            captured at request creation.
        updatedBy:
          type:
            - string
            - 'null'
        updatedAt:
          type: string
      required:
        - id
        - reviewId
        - exampleName
        - snapshotInputJson
        - snapshotExpectedJson
        - snapshotManifest
        - status
        - currentExpectedJson
        - fieldDecisions
        - currentExpectedFiles
        - fileDecisions
        - inputDrifted
        - updatedBy
        - updatedAt
      additionalProperties: false
    ApiErrorIssue:
      type: object
      properties:
        field:
          type: string
          description: JSON path of the offending field, or "<root>"
        message:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: >-
            Machine-readable error code (e.g. invalid_value, not_found,
            api_trigger_disabled, manual_trigger_disabled)
        severity:
          type: string
          enum:
            - error
            - warning
          description: Issue severity
      required:
        - field
        - message
        - code
        - severity
      additionalProperties: false
    DatasetReviewFieldDecision:
      type: object
      properties:
        decision:
          type: string
          enum:
            - approved
            - removed
        comment:
          type:
            - string
            - 'null'
        reviewerId:
          type: string
        updatedAt:
          type: string
      required:
        - decision
        - reviewerId
        - updatedAt
      additionalProperties: false
    DatasetReviewExpectedFile:
      type: object
      properties:
        path:
          type: string
          description: Expected-file path relative to the example expected/ folder.
        fileId:
          type: string
          description: >-
            Version id for the current bytes. Empty for snapshot-origin files,
            which resolve by path.
        filename:
          type: string
        origin:
          type: string
          enum:
            - snapshot
            - corrected
            - uploaded
          description: >-
            Whether the current bytes are the snapshotted dataset file, a
            reviewer-corrected version, or a brand-new reviewer upload.
      required:
        - path
        - fileId
        - filename
        - origin
      additionalProperties: false
    DatasetReviewFileDecision:
      type: object
      properties:
        decision:
          type: string
          enum:
            - approved
            - removed
        comment:
          type:
            - string
            - 'null'
        reviewerId:
          type: string
        updatedAt:
          type: string
      required:
        - decision
        - reviewerId
        - updatedAt
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key issued from Settings → API Keys. Pass as `Authorization: Bearer
        <key>`.

````

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