# Migrate a task to a newer workflow version

> Moves an open task onto a newer version of its workflow. A state the target version also declares maps to itself; state_map maps a state it lacks.

Moves an open task onto a newer version of its workflow. A state the target version also declares maps to itself; `state_map` maps a state it lacks. The payload is re-validated against the target `payload_schema`. The mapped state's `on_enter` is not fired: transition the task when you want the target's automation. A task with a dispatch in flight or a transition pending approval is refused, since both belong to the version they started under. Recorded in history as a row with `transition: null` and both versions.

  Request

<ParamsDetails
  {...require("./migrate-task.ParamsDetails.json")}
>

<RequestSchema
  {...require("./migrate-task.RequestSchema.json")}
>

<StatusCodes
  {...require("./migrate-task.StatusCodes.json")}
>
