On this page
runs.update
Update a live phone run's dynamic variables or metadata; returns a durable receipt (202 while pending, 200 once settled)
Request
PATCH /api/v1/runs/{run_id}
- MCP:
runs_update - SDK:
client.runs.update(SDK path arguments usepath; MCP usesparams). - Minimum API key role: member.
- Idempotency: required_header. Send an
Idempotency-Keyheader; MCP usesidempotency_key. Reuse it after an unknown outcome.
Use the request schema below. Read IDs from earlier operation results.
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
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
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
See API error handling and Troubleshooting.
Related guides
Content version d3aa4513Markdown source