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

# Input document statuses

> Understand the processing status of documents added to a Filed client

Every input document has a `status` that describes Filed's processing of the
current file version. Read it from the `inputDocuments` field on a client.

<Note>
  An input document's status is separate from the status of the ingestion
  [task](/apis/tasks). A task describes the overall background job, while an
  input-document status describes one file in that job.
</Note>

## Status values

| Status      | Meaning                                                                                        | What to do                                                                                                            |
| ----------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `running`   | Filed is waiting to process or is currently processing this file version.                      | Keep polling.                                                                                                         |
| `completed` | Filed successfully processed this file version.                                                | The document is ready for downstream Filed workflows.                                                                 |
| `failed`    | Filed could not process this file version, or could not start its processing workflow.         | Retry the ingestion operation. If it fails again, contact support with the client ID, input document ID, and task ID. |
| `duplicate` | The file has the same content as another file already processing or processed for this client. | No action is required. Filed does not process the duplicate again.                                                    |

Status values are lowercase GraphQL enum values:

```graphql theme={null}
enum InputDocumentStatus {
  running
  completed
  failed
  duplicate
}
```

## Status transitions

```mermaid theme={null}
flowchart LR
  A["New or changed file"] --> B["running"]
  B --> C["completed"]
  B --> D["failed"]
  D -->|retry| B
  A -->|matches existing file content| E["duplicate"]
```

New files begin in `running`. A successfully processed file becomes
`completed`; an unsuccessful file becomes `failed`. Retrying a failed file
returns it to `running`.

Filed compares file contents, not only filenames. If a file matches another
file that is already `running` or `completed` for the same client, the new input
is marked `duplicate` and does not run through processing again.

If an existing source file changes, Filed treats the new content as a new file
version and returns the input document to `running`.

## Query document statuses

Use a `workspaceToken` and query the client through `me`. See
[Authentication](/guides/authentication) for token setup.

```graphql theme={null}
query GetInputDocumentStatuses($clientId: ID!) {
  me {
    ... on WorkspaceUser {
      workspace {
        clients(filters: { ids: [$clientId] }) {
          id
          inputDocuments(sortBy: { field: "createdAt", order: DESC }) {
            id
            filename
            status
            createdAt
            updatedAt
          }
        }
      }
    }
  }
}
```

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://router.apps.filed.com/graphql \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_WORKSPACE_TOKEN" \
    -d '{
      "query": "query GetInputDocumentStatuses($clientId: ID!) { me { ... on WorkspaceUser { workspace { clients(filters: { ids: [$clientId] }) { id inputDocuments(sortBy: { field: \"createdAt\", order: DESC }) { id filename status createdAt updatedAt } } } } } }",
      "variables": {
        "clientId": "018f9c2a-3d5f-7a10-b2c4-9e8d7f6a5b4c"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "me": {
        "workspace": {
          "clients": [
            {
              "id": "018f9c2a-3d5f-7a10-b2c4-9e8d7f6a5b4c",
              "inputDocuments": [
                {
                  "id": "018f9c2a-7b1e-7c3d-9a4e-2f6b1c8d0e5a",
                  "filename": "w2_1040.pdf",
                  "status": "completed",
                  "createdAt": "2026-08-24T09:30:00.000Z",
                  "updatedAt": "2026-08-24T09:31:12.000Z"
                }
              ]
            }
          ]
        }
      }
    }
  }
  ```
</ResponseExample>

## Polling guidance

Poll the overall [task](/apis/tasks) when you need to know whether the complete
ingestion operation has finished. Query `inputDocuments.status` when you need
per-file progress or want to identify a particular failed or duplicate file.

Stop polling a document after it reaches `completed`, `failed`, or `duplicate`.
Only `running` represents ongoing work.

<Tip>
  When reporting a failure to Filed support, include the client ID, input document
  ID, and ingestion task ID. These identifiers make it possible to locate the
  exact processing attempt.
</Tip>
