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

> Fired when a new version of a workflow is published and becomes available for use.

## Event

```
flows.workflow.new_version
```

This event fires when a workflow author publishes a new version of an existing workflow. New workflow initiations will use the latest published version unless a specific version is requested.

## Payload Example

```json theme={null}
{
  "event": "flows.workflow.new_version",
  "event_id": "evt_01HXYZ5566778899",
  "organization_id": "org_abc123",
  "timestamp": "2025-06-04T10:00:00Z",
  "data": {
    "workflow_id": "wf_contract_review",
    "workflow_name": "Contract Review",
    "new_version": 3,
    "previous_version": 2,
    "published_by": "admin@example.com",
    "changelog": "Added legal approval step before final sign-off"
  }
}
```

## Payload Fields

### Envelope

| Field             | Type   | Description                                     |
| ----------------- | ------ | ----------------------------------------------- |
| `event`           | string | Always `flows.workflow.new_version`             |
| `event_id`        | string | Unique delivery ID — use to deduplicate retries |
| `organization_id` | string | ID of the organization that owns the workflow   |
| `timestamp`       | string | ISO 8601 UTC timestamp of the event             |
| `data`            | object | Event-specific payload (see below)              |

### Data Object

| Field              | Type    | Description                                     |
| ------------------ | ------- | ----------------------------------------------- |
| `workflow_id`      | string  | Unique identifier of the workflow               |
| `workflow_name`    | string  | Human-readable workflow name                    |
| `new_version`      | integer | Version number of the newly published version   |
| `previous_version` | integer | Version number that was previously active       |
| `published_by`     | string  | Email of the user who published the version     |
| `changelog`        | string  | Optional description of changes in this version |

## Notes

<Info>
  If you cache workflow schemas in your integration, listen for this event to invalidate your cache and fetch the updated schema via the [Get Workflow Schema](/api-reference/endpoint/workflows/get-schema) endpoint.
</Info>
