---
title: "Update the operation (Support status update as of now)"
method: PUT
path: "/v0/operations/{operationId}/"
tags: ["device_Operations"]
---

# Update the operation (Support status update as of now)

`PUT /v0/operations/{operationId}/`

Updates the status of an existing Dispatch operation. Supports CANCEL only. 

Use this endpoint to manually override an operation's state, most commonly to cancel an operation that has not yet dispatched or to force a stuck operation into a terminal state. This does not change the state of the individual devices within the operation.

**About Update Operation**

This endpoint currently supports status updates only, as noted in its own description. It is most useful for cancelling an operation that is still queued or resolving, since operations already in Dispatching or Dispatched may have already reached some devices before a cancellation can take effect. Because this updates the operation-level record, individual DeviceOperation states are not automatically changed and may need to be reconciled separately.

**Key Fields / Request Body**

state — the new operation state, CANCELLED

reason — free text explaining the state change

**Common Use Cases**

Cancelling an operation that was created in error before it reaches the dispatch stage

Forcing an operation that has been stuck in Dispatched or Processing for an extended period into a terminal state

**Best Practices**

Check the operation's current state with GET /v0/operations/{operationId}/ before attempting to cancel it, since only operations that have not yet dispatched can be reliably cancelled

Always include a reason so the override is auditable alongside the operation's activity history

**Workflow**

Call GET /v0/operations/{operationId}/ to confirm the operation is still in a cancellable state

PUT the new state and reason to this endpoint

Re-check the operation to confirm the update took effect

## Path parameters

- `operationId` string, required

## Request body

- object
  - `state` 'FAILED' | 'CANCELLED' | 'TIMEOUT' | 'SCHEDULED' — The new status of the operation

## Response `200`

Operation status updated successfully

- object
  - `operationId` string — The ID of the updated operation
  - `status` string — The updated status of the operation

---

[API](https://skmtc.net/esper/apis/esper-api-reference.md) · [All operations](https://skmtc.net/esper/apis/esper-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esper/esper-api-reference/revisions/e1f64cbb488e/schema)
