API

DeviceGrant

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}/grants/{device_grant_id}/revise create Owner-scoped product grant metadata; execution remains unavailable
POST /api/v1/organizations/{organization_id}/devices/{device_registration_id}/grants/{device_grant_id}/revoke create Owner-scoped product grant metadata; execution remains unavailable
POST /api/v1/organizations/{organization_id}/devices/{device_registration_id}/grants create Owner-scoped product grant metadata; execution remains unavailable
GET /api/v1/organizations/{organization_id}/devices/{device_registration_id}/grants list Owner-scoped product grant metadata; execution remains unavailable

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_grants, err := client.DeviceGrant(nil).List(map[string]any{"device_id": "example", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(device_grants)
created, err := client.DeviceGrant(nil).Create(map[string]any{"device_id": "example", "organization_id": "example", "agent_id": "example", "capabilities": []any{}, "principal_id": "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_grants, err = client:DeviceGrant():list({ device_id = "example", organization_id = "example" })
local created, err = client:DeviceGrant():create({ device_id = "example", organization_id = "example", agent_id = "example", capabilities = {}, principal_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$device_grants = $client->DeviceGrant()->list(["device_id" => "example", "organization_id" => "example"]);
$created = $client->DeviceGrant()->create(["device_id" => "example", "organization_id" => "example", "agent_id" => "example", "capabilities" => [], "principal_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

device_grants = client.DeviceGrant().list({"device_id": "example", "organization_id": "example"})
created = client.DeviceGrant().create({ "device_id": "example", "organization_id": "example", "agent_id": "example", "capabilities": [], "principal_id": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

device_grants = client.DeviceGrant.list({ "device_id" => "example", "organization_id" => "example" })
created = client.DeviceGrant.create({ "device_id" => "example", "organization_id" => "example", "agent_id" => "example", "capabilities" => [], "principal_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const device_grants = await client.DeviceGrant().list({ device_id: "example", organization_id: "example" })
const created = await client.DeviceGrant().create({ device_id: "example", organization_id: "example", agent_id: "example", capabilities: [], principal_id: "example" })

Fields

Field Type Required Description
agent_id string Yes Agent Id
agent_name one,string,null Yes Agent Name
can_edit boolean Yes Can Edit
can_revoke boolean Yes Can Revoke
capabilities array Yes Capabilities
created_at string Yes Created At
id string Yes Id
principal_id string Yes Principal Id
principal_name one,string,null Yes Principal Name
revision integer Yes Revision
revoked_at one,string,null Yes Revoked At
updated_at string Yes Updated At

create

POST /api/v1/organizations/{organization_id}/devices/{device_registration_id}/grants/{device_grant_id}/revise

Operation ID: deviceGrantRevise.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
device_registration_id path string Yes
device_grant_id path string Yes

Request body

application/json

Property Type Required Description
capabilities array of enum: browser, claude_code, coding_agents, computer, files, harnesses, ... Yes
revision integer Yes

Responses

200: Owner-scoped product grant metadata; execution remains unavailable

application/json

Property Type Required Description
execution_available boolean Yes
grant object Yes
grant.agent_id string Yes
grant.agent_name string,null Yes
grant.can_edit boolean Yes
grant.can_revoke boolean Yes
grant.capabilities array of enum: browser, claude_code, coding_agents, computer, files, harnesses, ... Yes
grant.created_at string (date-time) Yes
grant.id string Yes
grant.principal_id string Yes
grant.principal_name string,null Yes
grant.revision integer Yes
grant.revoked_at string,null (date-time) Yes
grant.updated_at string (date-time) Yes
400: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
401: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
403: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
404: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
409: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
422: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
503: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No

POST /api/v1/organizations/{organization_id}/devices/{device_registration_id}/grants/{device_grant_id}/revoke

Operation ID: deviceGrantRevoke.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
device_registration_id path string Yes
device_grant_id path string Yes

Request body

application/json

The request body is object.

Responses

200: Owner-scoped product grant metadata; execution remains unavailable

application/json

Property Type Required Description
execution_available boolean Yes
grant object Yes
grant.agent_id string Yes
grant.agent_name string,null Yes
grant.can_edit boolean Yes
grant.can_revoke boolean Yes
grant.capabilities array of enum: browser, claude_code, coding_agents, computer, files, harnesses, ... Yes
grant.created_at string (date-time) Yes
grant.id string Yes
grant.principal_id string Yes
grant.principal_name string,null Yes
grant.revision integer Yes
grant.revoked_at string,null (date-time) Yes
grant.updated_at string (date-time) Yes
400: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
401: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
403: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
404: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
409: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
422: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
503: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No

POST /api/v1/organizations/{organization_id}/devices/{device_registration_id}/grants

Operation ID: deviceGrantCreate.

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
agent_id string Yes
capabilities array of enum: browser, claude_code, coding_agents, computer, files, harnesses, ... Yes
principal_id string Yes

Responses

201: Owner-scoped product grant metadata; execution remains unavailable

application/json

Property Type Required Description
execution_available boolean Yes
grant object Yes
grant.agent_id string Yes
grant.agent_name string,null Yes
grant.can_edit boolean Yes
grant.can_revoke boolean Yes
grant.capabilities array of enum: browser, claude_code, coding_agents, computer, files, harnesses, ... Yes
grant.created_at string (date-time) Yes
grant.id string Yes
grant.principal_id string Yes
grant.principal_name string,null Yes
grant.revision integer Yes
grant.revoked_at string,null (date-time) Yes
grant.updated_at string (date-time) Yes
400: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
401: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
403: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
404: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
409: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
422: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
503: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No

list

GET /api/v1/organizations/{organization_id}/devices/{device_registration_id}/grants

Operation ID: deviceGrantsList.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
device_registration_id path string Yes
cursor query string No

Responses

200: Owner-scoped product grant metadata; execution remains unavailable

application/json

Property Type Required Description
active_grants array of object Yes
active_grants[].agent_id string Yes
active_grants[].agent_name string,null Yes
active_grants[].can_edit boolean Yes
active_grants[].can_revoke boolean Yes
active_grants[].capabilities array of enum: browser, claude_code, coding_agents, computer, files, harnesses, ... Yes
active_grants[].created_at string (date-time) Yes
active_grants[].id string Yes
active_grants[].principal_id string Yes
active_grants[].principal_name string,null Yes
active_grants[].revision integer Yes
active_grants[].revoked_at string,null (date-time) Yes
active_grants[].updated_at string (date-time) Yes
agent_choices array of object Yes Eligible picker choices, with current owner grant targets, on the first page only. Cursor pages return an empty array; retain first-page choices while combining grant pages.
agent_choices[].grant_to_revise object or null Yes
agent_choices[].id string Yes
agent_choices[].name string Yes
agent_choices[].principal_id string Yes
all_agents_access boolean Yes Whether every agent the owner can use may use this computer for the owner's messages, including agents added later.
execution_available boolean Yes
grants array of object Yes
grants[].agent_id string Yes
grants[].agent_name string,null Yes
grants[].can_edit boolean Yes
grants[].can_revoke boolean Yes
grants[].capabilities array of enum: browser, claude_code, coding_agents, computer, files, harnesses, ... Yes
grants[].created_at string (date-time) Yes
grants[].id string Yes
grants[].principal_id string Yes
grants[].principal_name string,null Yes
grants[].revision integer Yes
grants[].revoked_at string,null (date-time) Yes
grants[].updated_at string (date-time) Yes
next_cursor string,null Yes
400: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
401: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
403: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
404: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
409: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
422: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No
503: Invalid, unavailable or unauthorized device grant request

application/json

Property Type Required Description
details array of string No
error string Yes
field_errors object No