DeviceOperation
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/organizations/{organization_id}/devices/{device_registration_id}/control_operations |
create |
Current authorized local agent control result |
GET |
/api/v1/organizations/{organization_id}/devices/{device_registration_id}/control_operations/{id} |
load |
Current authorized local agent control result |
GET |
/api/v1/organizations/{organization_id}/devices/{device_registration_id}/control_operations/request |
load |
Current authorized local agent control result |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
device_operation, err := client.DeviceOperation(nil).Load(map[string]any{"device_id": "example", "id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(device_operation)
created, err := client.DeviceOperation(nil).Create(map[string]any{"device_id": "example", "organization_id": "example", "action": "example", "arguments": map[string]any{}, "key": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
Lua
Construct client as shown in the Lua setup, then call the operations:
local device_operation, err = client:DeviceOperation():load({ device_id = "example", id = "example_id", organization_id = "example" })
local created, err = client:DeviceOperation():create({ device_id = "example", organization_id = "example", action = "example", arguments = {}, key = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$device_operation = $client->DeviceOperation()->load(["device_id" => "example", "id" => "example_id", "organization_id" => "example"]);
$created = $client->DeviceOperation()->create(["device_id" => "example", "organization_id" => "example", "action" => "example", "arguments" => [], "key" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
device_operation = client.DeviceOperation().load({"device_id": "example", "id": "example_id", "organization_id": "example"})
created = client.DeviceOperation().create({ "device_id": "example", "organization_id": "example", "action": "example", "arguments": {}, "key": "example" })
Ruby
Construct client as shown in the Ruby setup, then call the operations:
device_operation = client.DeviceOperation.load({ "device_id" => "example", "id" => "example_id", "organization_id" => "example" })
created = client.DeviceOperation.create({ "device_id" => "example", "organization_id" => "example", "action" => "example", "arguments" => {}, "key" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const device_operation = await client.DeviceOperation().load({ device_id: "example", id: "example_id", organization_id: "example" })
const created = await client.DeviceOperation().create({ device_id: "example", organization_id: "example", action: "example", arguments: {}, key: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
action |
string |
Yes | Action |
arguments |
object |
Yes | Arguments |
created_at |
string |
Yes | Created At |
delivery |
object |
No | Present while a request waits on an offline computer and after it expires unclaimed: whether the computer is checking for requests and when it last did. |
device_id |
string |
Yes | Device Id |
diagnostic_code |
string |
No | Approved product error code retained after copied diagnostics expire. |
end |
object |
No | End |
expires_at |
string |
Yes | Expires At |
id |
string |
Yes | Id |
key |
string |
Yes | Key |
provider |
string |
Yes | Provider |
references |
object |
Yes | References |
result |
any |
Yes | Result |
result_expired |
boolean |
Yes | Private cached prompts/results expire after one hour; intent digests and native references remain as replay fences. |
state |
string |
Yes | State |
create
POST /api/v1/organizations/{organization_id}/devices/{device_registration_id}/control_operations
Operation ID: deviceControlCreate.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
device_registration_id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
action |
enum: agents.list, threads.list, threads.read, threads.start, threads.adopt, threads.release, ... |
Yes | |
arguments |
object |
Yes | |
arguments.result_delivery |
enum: notify, caller |
No | Structured source enrollment only; requires result_schema. notify preserves ordinary parent notifications. caller returns retained results to the workflow without another parent wake; explicit owner Always still reports the native final answer. |
key |
string |
Yes |
Responses
202: Current authorized local agent control result
application/json
| Property | Type | Required | Description |
|---|---|---|---|
operation |
object |
Yes | |
operation.action |
enum: agents.list, threads.list, threads.read, threads.start, threads.adopt, threads.release, ... |
Yes | |
operation.created_at |
string (date-time) |
Yes | |
operation.delivery |
object |
No | Present while a request waits on an offline computer and after it expires unclaimed: whether the computer is checking for requests and when it last did. |
operation.delivery.last_seen_at |
string,null (date-time) |
Yes | |
operation.delivery.message |
string |
Yes | |
operation.delivery.status |
enum: connected, offline, unknown |
Yes | |
operation.device_id |
string |
Yes | |
operation.diagnostic_code |
enum: active_turn, adoption_not_applied, claude_unavailable, codex_custody_unconfirmed, codex_preparation_failed, codex_thread_busy, ... |
No | Approved product error code retained after copied diagnostics expire. Absent for success, unknown codes and older cleared receipts; it does not reconcile uncertain delivery. |
operation.end |
object |
No | |
operation.end.can_dismiss |
boolean |
Yes | Durable permission to dismiss this End receipt after safe refusal, unclaimed expiry, or confirmed retirement. |
operation.end.native_finished_at |
string,null (date-time) |
Yes | |
operation.end.operation_id |
string |
Yes | |
operation.end.retired_at |
string,null (date-time) |
Yes | |
operation.end.status |
enum: ending, cleanup_pending, ended, failed, expired, uncertain |
Yes | |
operation.expires_at |
string (date-time) |
Yes | |
operation.id |
string |
Yes | |
operation.provider |
enum: codex, claude |
Yes | |
operation.references |
object |
Yes | |
operation.references.input_id |
string |
No | |
operation.references.provider |
enum: codex, claude |
No | |
operation.references.source_operation_id |
string |
No | |
operation.references.thread_id |
string |
No | |
operation.references.turn_id |
string |
No | |
operation.result |
object or object or object or object or object or object or object or object or object or object or null |
Yes | |
operation.result_expired |
boolean |
Yes | Private cached prompts/results expire after one hour; intent digests and native references remain as replay fences. |
operation.state |
enum: queued, claimed, completed, failed, expired, uncertain |
Yes |
400: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
401: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
403: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
404: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
409: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
422: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
503: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
load
GET /api/v1/organizations/{organization_id}/devices/{device_registration_id}/control_operations/{id}
Operation ID: deviceControlShow.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
device_registration_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Responses
200: Current authorized local agent control result
application/json
| Property | Type | Required | Description |
|---|---|---|---|
operation |
object |
Yes | |
operation.action |
enum: agents.list, threads.list, threads.read, threads.start, threads.adopt, threads.release, ... |
Yes | |
operation.created_at |
string (date-time) |
Yes | |
operation.delivery |
object |
No | Present while a request waits on an offline computer and after it expires unclaimed: whether the computer is checking for requests and when it last did. |
operation.delivery.last_seen_at |
string,null (date-time) |
Yes | |
operation.delivery.message |
string |
Yes | |
operation.delivery.status |
enum: connected, offline, unknown |
Yes | |
operation.device_id |
string |
Yes | |
operation.diagnostic_code |
enum: active_turn, adoption_not_applied, claude_unavailable, codex_custody_unconfirmed, codex_preparation_failed, codex_thread_busy, ... |
No | Approved product error code retained after copied diagnostics expire. Absent for success, unknown codes and older cleared receipts; it does not reconcile uncertain delivery. |
operation.end |
object |
No | |
operation.end.can_dismiss |
boolean |
Yes | Durable permission to dismiss this End receipt after safe refusal, unclaimed expiry, or confirmed retirement. |
operation.end.native_finished_at |
string,null (date-time) |
Yes | |
operation.end.operation_id |
string |
Yes | |
operation.end.retired_at |
string,null (date-time) |
Yes | |
operation.end.status |
enum: ending, cleanup_pending, ended, failed, expired, uncertain |
Yes | |
operation.expires_at |
string (date-time) |
Yes | |
operation.id |
string |
Yes | |
operation.provider |
enum: codex, claude |
Yes | |
operation.references |
object |
Yes | |
operation.references.input_id |
string |
No | |
operation.references.provider |
enum: codex, claude |
No | |
operation.references.source_operation_id |
string |
No | |
operation.references.thread_id |
string |
No | |
operation.references.turn_id |
string |
No | |
operation.result |
object or object or object or object or object or object or object or object or object or object or null |
Yes | |
operation.result_expired |
boolean |
Yes | Private cached prompts/results expire after one hour; intent digests and native references remain as replay fences. |
operation.state |
enum: queued, claimed, completed, failed, expired, uncertain |
Yes |
400: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
401: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
403: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
404: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
409: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
422: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
503: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
GET /api/v1/organizations/{organization_id}/devices/{device_registration_id}/control_operations/request
Operation ID: deviceControlLookupRequest.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
device_registration_id |
path |
string |
Yes | |
request_key |
query |
string |
Yes | The original exact owner request key, from 1 to 512 UTF-8 bytes. |
Responses
200: Current authorized local agent control result
application/json
| Property | Type | Required | Description |
|---|---|---|---|
operation |
object |
Yes | |
operation.action |
enum: agents.list, threads.list, threads.read, threads.start, threads.adopt, threads.release, ... |
Yes | |
operation.created_at |
string (date-time) |
Yes | |
operation.delivery |
object |
No | Present while a request waits on an offline computer and after it expires unclaimed: whether the computer is checking for requests and when it last did. |
operation.delivery.last_seen_at |
string,null (date-time) |
Yes | |
operation.delivery.message |
string |
Yes | |
operation.delivery.status |
enum: connected, offline, unknown |
Yes | |
operation.device_id |
string |
Yes | |
operation.diagnostic_code |
enum: active_turn, adoption_not_applied, claude_unavailable, codex_custody_unconfirmed, codex_preparation_failed, codex_thread_busy, ... |
No | Approved product error code retained after copied diagnostics expire. Absent for success, unknown codes and older cleared receipts; it does not reconcile uncertain delivery. |
operation.end |
object |
No | |
operation.end.can_dismiss |
boolean |
Yes | Durable permission to dismiss this End receipt after safe refusal, unclaimed expiry, or confirmed retirement. |
operation.end.native_finished_at |
string,null (date-time) |
Yes | |
operation.end.operation_id |
string |
Yes | |
operation.end.retired_at |
string,null (date-time) |
Yes | |
operation.end.status |
enum: ending, cleanup_pending, ended, failed, expired, uncertain |
Yes | |
operation.expires_at |
string (date-time) |
Yes | |
operation.id |
string |
Yes | |
operation.provider |
enum: codex, claude |
Yes | |
operation.references |
object |
Yes | |
operation.references.input_id |
string |
No | |
operation.references.provider |
enum: codex, claude |
No | |
operation.references.source_operation_id |
string |
No | |
operation.references.thread_id |
string |
No | |
operation.references.turn_id |
string |
No | |
operation.result |
object or object or object or object or object or object or object or object or object or object or null |
Yes | |
operation.result_expired |
boolean |
Yes | Private cached prompts/results expire after one hour; intent digests and native references remain as replay fences. |
operation.state |
enum: queued, claimed, completed, failed, expired, uncertain |
Yes |
400: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
401: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
403: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
404: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
409: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
422: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |
503: Request refused or computer unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes | |
field_errors |
object |
No |