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

# core.document.upload_with_issues

> Fired when a document upload finishes processing but issues were detected during extraction or classification. The document is available but may need review.

## Event

```
core.document.upload_with_issues
```

This event fires when processing ends without a clean result - the document was judged irrelevant, was a duplicate, needs human review, or failed outright. The `status` field says which.

## Payload Example

```json theme={null}
{
  "event": "core.document.upload_with_issues",
  "event_id": "3f7c1a8e-5b2d-4e9a-9c31-8a6f0d4b7e12",
  "organization_id": 42,
  "user_id": 1337,
  "payload_version": 1,
  "timestamp": "2026-09-02T14:32:00Z",
  "data": {
    "document_id": 88213,
    "document_processing_id": 4471,
    "file_name": "scan_003.pdf",
    "status": "irrelevant",
    "issue_reason": "duplicate_document",
    "source": "email",
    "actor": {
      "user_id": 1337,
      "email": "john.doe@example.com",
      "name": "John Doe"
    }
  }
}
```

## Payload Fields

### Envelope

| Field | Type | Description |
| - | - | - |
| `event` | string | Always `core.document.upload_with_issues` |
| `event_id` | string | UUID for this delivery. Use it to deduplicate retries |
| `organization_id` | integer | ID of the organization the event occurred in |
| `user_id` | integer or null | ID of the user who triggered the event |
| `payload_version` | integer | Envelope schema version. Currently `1` |
| `timestamp` | string | ISO 8601 UTC timestamp of when the event was generated |
| `data` | object | Event-specific payload (see below) |

### Data Object

| Field | Type | Description |
| - | - | - |
| `document_id` | integer or null | ID of the Knowledge Center document. `null` when the failure happened before the document record was created |
| `document_processing_id` | integer | ID of the processing job that ended with issues |
| `file_name` | string | Name of the uploaded file |
| `status` | string | Terminal processing status, for example `irrelevant`, `with_issues`, `require_human_intervention`, `failed`, or `pending_user` |
| `issue_reason` | string or null | Why the document was rejected, when a reason was recorded |
| `source` | string | Where the document came from: `local`, `drive`, `sharepoint`, `email`, `workflow`, `integration`, `external_api`, `docusign`, `salesforce`, or `autosplit` |
| `actor` | object | The user who uploaded the document (see below) |

### Actor Object

Chamelio resolves the acting user at send time. `user_id` is present whenever a user triggered the
event; `email` and `name` are filled in only if that user could still be resolved in the
organization.

| Field | Type | Description |
| - | - | - |
| `user_id` | integer or null | ID of the user who triggered the event |
| `email` | string or null | Email of that user |
| `name` | string or null | Full name of that user |

> [!NOTE]
>
> `document_id` is nullable here specifically because some failures happen before a Knowledge Center document is
> created. Key your bookkeeping on `document_processing_id`, which is always present.
