# Update a task

> Updates a task's payload, title, or assignee. `state` is never directly writable — move it with a transition; sending a `state` field is rejected as an unknown field (`VALIDATION_FAILED`). `payload` is shallow-merged over the existing payload (PATCH semantics): keys the request omits are preserved. The payload is caller-owned; the automation result lives in the read-only `last_result` field, which no patch can reach. The merged payload is validated against the workflow's `payload_schema`.

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Update a task"}
>
</Heading>

<MethodEndpoint
  method={"patch"}
  path={"/api/v1/tasks/{task_id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Updates a task's payload, title, or assignee. `state` is never directly writable — move it with a transition; sending a `state` field is rejected as an unknown field (`VALIDATION_FAILED`). `payload` is shallow-merged over the existing payload (PATCH semantics): keys the request omits are preserved. The payload is caller-owned; the automation result lives in the read-only `last_result` field, which no patch can reach. The merged payload is validated against the workflow's `payload_schema`.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
>
  <Translate id="theme.openapi.request.title">Request</Translate>
</Heading>

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

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

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