> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://developers.truemed.com/v-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.truemed.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.truemed.com/_mcp/server.

# Update Dispute Counter

POST https://dev-api.truemed.com/api/v1/disputes/{business_id}/counters/{counter_id}
Content-Type: application/json

Save a draft counter's evidence. This is a full replacement of the draft's `evidence_items`, built for autosave — call it as the merchant edits. Only a counter still in the `draft` state can be saved; saving a submitted or withdrawn counter returns `400`.

Pass the `revision` you last read. If the counter changed since then (e.g. another tab saved it), the request is rejected with `409` so you can reload rather than silently clobber the newer edit. Any attached `file_ids` must reference files you own, or the save is rejected with `422`.

Reference: https://developers.truemed.com/api-reference/disputes/update-dispute-counter

## Authentication

- `x-truemed-api-key` header (required) — Sales channel API key for merchant server-to-server authentication

## Servers

- `https://dev-api.truemed.com` (Development server, default)
- `https://api.truemed.com` (Production server)

## Request

### Path parameters

- `business_id` (string, required) — The Truemed dispute ID (UUID).
- `counter_id` (string, required) — The Truemed counter ID (UUID).

### Body (application/json)

This endpoint expects a CounterUpsertRequest.

- `revision` (integer, required) — The revision you last read; the save is rejected (409) if the counter changed since.
- `evidence_items` (list of EvidenceItem, optional, default: []) — Full replacement of the draft's categorized evidence.

## Response

### 200

Successful response

- `counter_id` (string, required) — Stable Truemed counter ID (UUID).
- `created_at` (datetime, required) — When this counter was created.
- `phase` (enum, required) — Dispute phase this counter responds to.
  - Allowed values: `inquiry`, `dispute`, `pre_arbitration`, `arbitration`
- `revision` (integer, required) — Optimistic-lock revision; echo it back on the next draft save to detect conflicts.
- `state` (enum, required) — Counter lifecycle state.
  - Allowed values: `draft`, `submitted`, `withdrawn`, `superseded`
- `updated_at` (datetime, required) — When this counter was last updated.
- `evidence_items` (list of EvidenceItem, optional, default: []) — The categorized evidence captured on this counter.
- `submitted_at` (datetime, optional, nullable) — When this counter was submitted to the processor.
- `submitted_by` (string, optional, nullable) — Email of the dashboard user who submitted this counter; null for drafts or API-key submissions.

## Errors

### 400 Bad Request Error

Bad Request

- `error` (enum, required)
  - Allowed values: `TotalAmountInvalid`, `ValidationError`
- `message` (string, required)

### 404 Not Found Error

Not Found

- `error` (enum, required)
  - Allowed values: `NotFound`
- `message` (string, required)

### 405 Method Not Allowed Error

Method Not Allowed

- `error` (enum, required)
  - Allowed values: `MethodNotAllowed`
- `message` (string, required)

### 500 Internal Server Error

Internal Server Error

- `error` (enum, required)
  - Allowed values: `ServerError`
- `message` (string, required)

### 501 Not Implemented Error

Not Implemented

- `error` (enum, required)
  - Allowed values: `NotImplemented`
- `message` (string, required)

## Types

### EvidenceItem

- `category` (enum, required) — Canonical evidence category; the adapter maps it to the processor's evidence fields.
  - Allowed values: `product_description`, `customer_communication`, `customer_name`, `customer_email`, `customer_purchase_ip`, `customer_signature`, `billing_address`, `receipt`, `shipping_documentation`, `shipping_tracking_number`, `service_documentation`, `service_date`, `access_activity_log`, `refund_policy`, `refund_policy_disclosure`, `refund_refusal_explanation`, `cancellation_policy`, `cancellation_policy_disclosure`, `cancellation_rebuttal`, `duplicate_charge_documentation`, `duplicate_charge_explanation`, `uncategorized`
- `file_ids` (list of string, optional, default: []) — File IDs (from the Files API) attached for this category; must be owned by you.
- `text` (string, optional, nullable) — Free-text evidence for this category.

## Examples

**Request**

```json
{
  "revision": 1
}
```

**Response**

```json
{
  "counter_id": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "phase": "inquiry",
  "revision": 1,
  "state": "draft",
  "updated_at": "2024-01-15T09:30:00Z",
  "evidence_items": [
    {
      "category": "product_description",
      "file_ids": [
        "string"
      ],
      "text": "string"
    }
  ],
  "submitted_at": "2024-01-15T09:30:00Z",
  "submitted_by": "string"
}
```

**SDK Code**

```python
import requests

url = "https://dev-api.truemed.com/api/v1/disputes/business_id/counters/counter_id"

payload = { "revision": 1 }
headers = {
    "x-truemed-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://dev-api.truemed.com/api/v1/disputes/business_id/counters/counter_id';
const options = {
  method: 'POST',
  headers: {'x-truemed-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"revision":1}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```