# Upload evidence (https://docs.chargeflow.io/docs/merchants/recover/upload-evidence)



The Upload Evidence API allows you to attach supporting documents directly to a dispute. Use it when you have screenshots, delivery confirmations, signed invoices, or other file-based artifacts that strengthen your chargeback response.

## When to upload evidence [#when-to-upload-evidence]

* Screenshots of customer communications (support tickets, email threads, chat logs)
* Proof of delivery or tracking confirmation documents
* Signed invoices or order confirmations
* Any additional documentation that corroborates your response narrative

<Callout type="idea" title="Tip">
  Upload evidence as early as possible after receiving a `dispute.created` event. Chargeflow
  incorporates uploaded files into the evidence package before submission, so the sooner they
  arrive, the more time the AI has to build around them.
</Callout>

## Where does my data go? [#where-does-my-data-go]

| Data type                                                            | Endpoint                                                                                   |
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| Structured fields (customer, order, products, transaction)           | [Enrich dispute](https://docs.chargeflow.io/docs/merchants/recover/enrich-a-dispute) (`PATCH /disputes/{disputeId}`) |
| Unstructured data (usage reports, screenshots, rich text, documents) | Upload evidence (this page), with `evidenceUploadCategory=additional_evidence`             |

Chargeflow runs OCR on every uploaded file, checks whether its content is relevant to the dispute, and decides whether to include it in the response. Files it finds not relevant are left out of the response.

Rich text from a CRM (a notes field, a ticket body) is not a file yet: export or print it to PDF, then upload the PDF.

## Endpoint [#endpoint]

```
POST https://api.chargeflow.io/public/2025-04-01/disputes/{disputeId}/evidence
```

This is a `multipart/form-data` request. Pass the Chargeflow dispute ID as the path parameter.

### Request fields [#request-fields]

| Field                    | Type   | Required    | Description                                                                           |
| ------------------------ | ------ | ----------- | ------------------------------------------------------------------------------------- |
| `file`                   | binary | Yes         | The file to upload                                                                    |
| `evidenceUploadCategory` | string | Yes         | Category of the evidence (see values below)                                           |
| `content`                | string | Conditional | Required when `evidenceUploadCategory` is `additional_evidence` or `additional_notes` |

**`evidenceUploadCategory` values:**

| Value                    | Description                                                                  |
| ------------------------ | ---------------------------------------------------------------------------- |
| `tracking_information`   | Shipping tracking documents or delivery confirmations                        |
| `customer_communication` | Screenshots or transcripts of customer conversations                         |
| `invoice`                | Invoices or order confirmations                                              |
| `additional_evidence`    | Any other supporting evidence (requires `content` field)                     |
| `additional_notes`       | Free-form notes to accompany the dispute response (requires `content` field) |

### Accepted file formats [#accepted-file-formats]

* Images: PNG, JPG
* Documents: PDF
* Maximum file size: 5 MB

## Example: upload a customer communication screenshot [#example-upload-a-customer-communication-screenshot]

```bash title="Terminal"
curl -X POST https://api.chargeflow.io/public/2025-04-01/disputes/DISPUTE_ID/evidence \
  -H "x-api-key: YOUR_API_KEY" \
  -F "file=@/path/to/screenshot.png" \
  -F "evidenceUploadCategory=customer_communication"
```

## Example: upload tracking information with a note [#example-upload-tracking-information-with-a-note]

```bash title="Terminal"
curl -X POST https://api.chargeflow.io/public/2025-04-01/disputes/DISPUTE_ID/evidence \
  -H "x-api-key: YOUR_API_KEY" \
  -F "file=@/path/to/delivery-confirmation.pdf" \
  -F "evidenceUploadCategory=additional_evidence" \
  -F "content=FedEx delivery confirmation showing package signed for at customer address on Jan 26."
```

## Response [#response]

A successful upload returns `200 OK` with the evidence ID:

```json title="Response"
{
  "requestId": "req_abc123def456",
  "evidenceId": "evd_789xyz"
}
```

## Upload-specific errors [#upload-specific-errors]

A file larger than 5 MB is rejected with a `400`. For the full list of HTTP status codes and the standard error response shape, see [Error handling](https://docs.chargeflow.io/docs/reference/api-fundamentals/error-handling).

## Next steps [#next-steps]

<Cards>
  <Card title="Enrich a dispute" href="./enrich-a-dispute">
    Send structured data alongside file uploads.
  </Card>

  <Card title="Add customer communications" href="./enrich-a-dispute/customer-communications">
    Log structured message records (not file uploads) via the dedicated endpoint.
  </Card>

  <Card title="Enrich by business model" href="./enrich-a-dispute/by-business-model">
    The structured evidence that pairs with your uploads, for SaaS or physical goods.
  </Card>
</Cards>
