> ## 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.

# flows.tasks.new_negotiate_version

> Fired when a new negotiation version of a document is uploaded to a task.

## Event

```
flows.tasks.new_negotiate_version
```

This event fires when a new version of a negotiated document is added to a task - through the [Upload Negotiation Version](/api-reference/endpoint/tasks/negotiation-version) API, from the Chamelio web application, or when a counterparty's revision is ingested.

## Payload Example

```json theme={null}
{
  "event": "flows.tasks.new_negotiate_version",
  "event_id": "3f7c1a8e-5b2d-4e9a-9c31-8a6f0d4b7e12",
  "organization_id": 42,
  "user_id": 1337,
  "payload_version": 1,
  "timestamp": "2026-09-02T14:32:00Z",
  "data": {
    "workflow_id": "wf_contract_review",
    "workflow_state_id": "ws_9f2a41c8",
    "task_id": 12345,
    "negotiation_version_id": 771,
    "step_run_id": "sr_negotiate_2",
    "file_uuid": "b41e9c02-7d5a-4f18-9a3b-2c6e8d0f1a44",
    "version": 3,
    "attachment_id": 4471,
    "document_id": 88213,
    "file_name": "vendor_agreement_v3.docx",
    "uploading_party": "counterparty",
    "intake_channels": [
      "email"
    ]
  }
}
```

## Payload Fields

### Envelope

| Field             | Type            | Description                                            |
| ----------------- | --------------- | ------------------------------------------------------ |
| `event`           | string          | Always `flows.tasks.new_negotiate_version`             |
| `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 uploaded the version                |
| `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                                                                 |
| ------------------------ | ---------------- | --------------------------------------------------------------------------- |
| `workflow_id`            | string           | ID of the parent workflow                                                   |
| `workflow_state_id`      | string           | ID of this particular workflow run                                          |
| `task_id`                | integer          | ID of the task the version was added to                                     |
| `negotiation_version_id` | integer or null  | ID of the negotiation version record                                        |
| `step_run_id`            | string           | ID of the negotiation step run the version belongs to                       |
| `file_uuid`              | string           | UUID of the uploaded file within the negotiation thread                     |
| `version`                | integer          | Sequential version number within the thread                                 |
| `attachment_id`          | integer or null  | ID of the stored attachment, when the file was kept as one                  |
| `document_id`            | integer or null  | ID of the Core document, when the file was filed into Core                  |
| `file_name`              | string           | Name of the uploaded file                                                   |
| `uploading_party`        | string           | Which side supplied the version: `legal`, `counterparty`, or `stakeholders` |
| `intake_channels`        | array of strings | Channel the task was intaken through                                        |

<Info>
  This event is only emitted for workflow runs that have a task. A workflow state
  without a `task_id` produces no webhook.
</Info>

<Info>
  `intake_channels` is derived from the run's first step when that step is an intake step, so it
  contains at most one channel. It is an empty array for workflows that do not begin with an intake
  step.
</Info>

<Tip>
  Use [Get Latest Negotiation Versions](/api-reference/endpoint/tasks/latest-negotiation-versions) with the
  `step_run_id` from this payload to fetch a download URL for the new version.
</Tip>
