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

# Update Workflow Approval Status

> Update the approval status of a workflow run's output.

**Request Body:**
- `action`: One of "approve", "reject", or "pending"
- `notes`: Optional notes about the decision

**Approval Flow:**
- When approved, the workflow output will be applied to the data asset
- When rejected, the workflow output is discarded
- When set to pending, the approval is reset for re-review (clears previous decision)

**Returns:**
- 200: Approval updated successfully
- 400: Invalid action (e.g., trying to set to pending when already pending)
- 404: Approval not found for this run



## OpenAPI

````yaml /openapi/em-data-readiness-v2.yaml patch /api/data-readiness/workflows/runs/{run_id}/approval
openapi: 3.1.0
info:
  title: EM Data Readiness Service
  description: Data Readiness Service API for managing workflows, metrics, and data quality
  version: 4.3.0-dev1
servers: []
security:
  - BearerAuth: []
tags:
  - name: Health
    description: Service health monitoring. Check service status and version information.
  - name: Root
    description: Root endpoint providing service information and navigation links.
  - name: Configuration
    description: Service configuration endpoints. View current configuration values.
  - name: Workflows
    description: >-
      Workflow configuration and execution management. Create, configure, and
      run data quality workflows including definitions, configurations, runs,
      and tasks.
  - name: Data Assets
    description: >-
      Data catalog entity management. Manage databases, schemas, and tables
      metadata.
  - name: Metrics
    description: >-
      Data quality metrics and scorecards. Calculate scores, view trends, and
      analyze dimensions.
  - name: Violations
    description: >-
      Data quality violation management. View, acknowledge, and remediate
      detected violations.
  - name: Glossary
    description: >-
      Business glossary management. Create, verify, and organize business terms
      and definitions.
paths:
  /api/data-readiness/workflows/runs/{run_id}/approval:
    patch:
      tags:
        - Workflows
      summary: Update Workflow Approval Status
      description: >-
        Update the approval status of a workflow run's output.


        **Request Body:**

        - `action`: One of "approve", "reject", or "pending"

        - `notes`: Optional notes about the decision


        **Approval Flow:**

        - When approved, the workflow output will be applied to the data asset

        - When rejected, the workflow output is discarded

        - When set to pending, the approval is reset for re-review (clears
        previous decision)


        **Returns:**

        - 200: Approval updated successfully

        - 400: Invalid action (e.g., trying to set to pending when already
        pending)

        - 404: Approval not found for this run
      operationId: >-
        update_approval_api_data_readiness_workflows_runs__run_id__approval_patch
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            description: Workflow run ID
            title: Run Id
          description: Workflow run ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApprovalActionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalWithApplyResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    ApprovalActionRequest:
      properties:
        action:
          type: string
          pattern: ^(approve|reject|pending)$
          title: Action
          description: Approval action to take
          examples:
            - approve
            - reject
            - pending
        notes:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Notes
          description: Optional notes about the approval decision
      type: object
      required:
        - action
      title: ApprovalActionRequest
      description: >-
        Request body for approving, rejecting, or resetting a workflow run
        approval.
    ApprovalWithApplyResult:
      properties:
        id:
          type: string
          title: Id
          description: Unique approval identifier
        workflow_run_id:
          type: string
          title: Workflow Run Id
          description: Workflow run ID
        status:
          type: string
          title: Status
          description: Approval status
          examples:
            - pending
            - approved
            - rejected
        approved_by_client_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Approved By Client Id
          description: Client ID of approver
        approved_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Approved At
          description: Approval timestamp (ISO 8601)
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: Approval notes
        auto_saved:
          type: boolean
          title: Auto Saved
          description: Whether this approval was auto-saved (no manual approval step)
          default: false
        created_at:
          type: string
          title: Created At
          description: Creation timestamp (ISO 8601)
        updated_at:
          type: string
          title: Updated At
          description: Last update timestamp (ISO 8601)
        changes_applied:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Changes Applied
          description: Details of changes applied to the data asset
      type: object
      required:
        - id
        - workflow_run_id
        - status
        - created_at
        - updated_at
      title: ApprovalWithApplyResult
      description: Approval response with information about applied changes.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Bearer token authentication. Include the token in the Authorization
        header as: `Authorization: Bearer <token>`. The JWT must contain valid
        client_id, and project_id claims for tenant isolation and SDK routing.

````