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

# Create Pending Approval

> Create a pending approval record for a completed workflow run.

This is typically called automatically when a workflow completes, but can also
be called manually to create an approval for a run that doesn't have one.

**Returns:**
- 201: Approval created successfully
- 404: Workflow run not found
- 409: Approval already exists for this run



## OpenAPI

````yaml /openapi/em-data-readiness-v2.yaml post /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:
    post:
      tags:
        - Workflows
      summary: Create Pending Approval
      description: >-
        Create a pending approval record for a completed workflow run.


        This is typically called automatically when a workflow completes, but
        can also

        be called manually to create an approval for a run that doesn't have
        one.


        **Returns:**

        - 201: Approval created successfully

        - 404: Workflow run not found

        - 409: Approval already exists for this run
      operationId: create_approval_api_data_readiness_workflows_runs__run_id__approval_post
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            description: Workflow run ID
            title: Run Id
          description: Workflow run ID
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    ApprovalResponse:
      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)
      type: object
      required:
        - id
        - workflow_run_id
        - status
        - created_at
        - updated_at
      title: ApprovalResponse
      description: Response for workflow run approval operations.
    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.

````