Source: https://docs.cumuluslabs.io/reference/runs.update
Content version: d3aa4513

# runs.update

Update a live phone run's dynamic variables or metadata; returns a durable receipt (202 while pending, 200 once settled)

## Request {#request}

`PATCH /api/v1/runs/{run_id}`

- MCP: `runs_update`
- SDK: `client.runs.update` (SDK path arguments use `path`; MCP uses `params`).
- Minimum API key role: **member**.
- Idempotency: **required_header**. Send an `Idempotency-Key` header; MCP uses `idempotency_key`. Reuse it after an unknown outcome.

Use the request schema below. Read IDs from earlier operation results.

## Input schema {#input-schema}

```json
{
  "parameters": [
    {
      "name": "run_id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid"
      }
    },
    {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/RunsUpdateRequest"
        }
      }
    }
  }
}
```

## Responses {#responses}

```json
{
  "200": {
    "description": "Update a live phone run's dynamic variables or metadata; returns a durable receipt (202 while pending, 200 once settled)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/RunsUpdateResponse200"
        }
      }
    }
  },
  "202": {
    "description": "Update a live phone run's dynamic variables or metadata; returns a durable receipt (202 while pending, 200 once settled)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/RunsUpdateResponse200"
        }
      }
    }
  },
  "4XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  },
  "5XX": {
    "description": "Typed error (ApiError)",
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}
```

## Referenced schemas {#schemas}

```json
{
  "components": {
    "schemas": {
      "RunsUpdateRequest": {
        "type": "object",
        "properties": {
          "override_dynamic_variables": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 4096
            }
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {},
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RunsUpdateResponse200": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "update": {
            "$ref": "#/components/schemas/RunsUpdateGetResponse200"
          }
        },
        "required": [
          "run_id",
          "update"
        ],
        "additionalProperties": false
      },
      "RunsUpdateGetResponse200": {
        "type": "object",
        "properties": {
          "update_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "acknowledged",
              "applying",
              "applied",
              "rejected",
              "indeterminate"
            ]
          },
          "acknowledged_at": {
            "type": "string",
            "format": "date-time"
          },
          "deadline": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "allOf": [
              {
                "type": "string",
                "format": "date-time"
              }
            ],
            "nullable": true
          },
          "reason": {
            "type": "string",
            "maxLength": 256,
            "nullable": true
          },
          "applied": {
            "type": "boolean"
          }
        },
        "required": [
          "update_id",
          "run_id",
          "revision",
          "status",
          "acknowledged_at",
          "deadline",
          "completed_at",
          "reason",
          "applied"
        ],
        "additionalProperties": false
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "unauthenticated",
                  "forbidden",
                  "not_found",
                  "conflict",
                  "invalid_request",
                  "idempotency_conflict",
                  "policy_denied",
                  "capability_unavailable",
                  "provider_unavailable",
                  "knowledge_unavailable",
                  "publication_invalid",
                  "run_not_active",
                  "rate_limited",
                  "outcome_unknown",
                  "internal"
                ]
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "none",
                  "unknown"
                ]
              },
              "details": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": [
              "code",
              "message",
              "retryable",
              "outcome"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

## Errors and recovery {#errors}

See [API error handling](https://docs.cumuluslabs.io/api#errors) and [Troubleshooting](https://docs.cumuluslabs.io/troubleshooting).

## Related guides {#related-guides}

- [Using the API](https://docs.cumuluslabs.io/api)
- [Runs](https://docs.cumuluslabs.io/runs)
- [Troubleshooting](https://docs.cumuluslabs.io/troubleshooting)
