---
title: "Approve, reject, or reopen an extracted document"
method: POST
path: "/internal/api/document/{document_id}/workflow"
tags: ["DOCUMENT"]
---

# Approve, reject, or reopen an extracted document

`POST /internal/api/document/{document_id}/workflow`

## Request

- Base URL: `https://api.signalshq.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.signalshq.io/internal/api/document/{document_id}/workflow`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/login`

Consolidated endpoint for approving, rejecting, or reopening extracted documents. Use the 'action' query parameter to specify the action: 'approve', 'reject', or 'reopen'. For rejection and reopening, a reason must be provided in the request body.

## Path parameters

- `document_id` string, uuid, required: Document ID

## Query parameters

- `action` 'approve' | 'reject' | 'reopen', required: Enum for document workflow actions.

## Request body

- union
  - DocumentApprovalRequest: Request to approve a document.
    - `client_id` string, uuid, required: Client ID
  - DocumentRejectionRequest: Request to reject a document.
    - `client_id` string, uuid, required: Client ID
    - `reason` string, nullable, required: Reason for rejection
  - DocumentReopenRequest: Request model for document reopening.
    - `client_id` string, uuid, required: Client ID
    - `reason` string, required: Reason for reopening

## Response `200`

Successful Response

- union
  - DocumentApprovalResponse: Response model for document approval.
    - `document_id` string, uuid, required: ID of the approved document
    - `workflow_id` string, uuid, required: ID of the workflow
    - `status` 'CREATED' | 'IN_PROGRESS' | 'APPROVED' | 'REJECTED' | 'CANCELLED' | 'REOPENED', required
    - `approved_at` string, date-time, required: Timestamp when document was approved
    - `approved_by` string, uuid, required: User ID who approved the document
  - DocumentRejectionResponse: Response model for document rejection.
    - `document_id` string, uuid, required: ID of the rejected document
    - `workflow_id` string, uuid, required: ID of the workflow
    - `status` 'CREATED' | 'IN_PROGRESS' | 'APPROVED' | 'REJECTED' | 'CANCELLED' | 'REOPENED', required
    - `rejected_at` string, date-time, nullable, required: Timestamp when document was rejected
    - `rejected_by` string, uuid, nullable, required: User ID who rejected the document
    - `rejection_reason` string, nullable, required: Reason for rejection
  - DocumentReopenResponse: Response model for document reopening.
    - `document_id` string, uuid, required: ID of the reopened document
    - `workflow_id` string, uuid, required: ID of the workflow
    - `status` 'CREATED' | 'IN_PROGRESS' | 'APPROVED' | 'REJECTED' | 'CANCELLED' | 'REOPENED', required
    - `reopened_at` string, date-time, required: Timestamp when document was reopened
    - `reopened_by` string, uuid, required: User ID who reopened the document
    - `reopen_reason` string, nullable, required: Reason for reopening

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/signalshq/apis/signals-api.md) - [All operations](https://skmtc.dev/signalshq/apis/signals-api/llms.txt) - [OpenAPI document](https://skmtc.dev/signalshq/apis/signals-api/revisions/2c22af3b5576?raw)
