API

AgentWritePermission

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
GET /api/v1/organizations/{organization_id}/agents/{id}/write_permissions list The agent's write permissions, by tool
DELETE /api/v1/organizations/{organization_id}/agents/{id}/write_permissions/{write_permission_id} remove The permission is removed

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:

agent_write_permissions, err := client.AgentWritePermission(nil).List(map[string]any{"agent_id": "example", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(agent_write_permissions)
removed, err := client.AgentWritePermission(nil).Remove(map[string]any{"agent_id": "example", "id": "example_id", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

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

local agent_write_permissions, err = client:AgentWritePermission():list({ agent_id = "example", organization_id = "example" })
local removed, err = client:AgentWritePermission():remove({ agent_id = "example", id = "example_id", organization_id = "example" })

PHP

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

$agent_write_permissions = $client->AgentWritePermission()->list(["agent_id" => "example", "organization_id" => "example"]);
$client->AgentWritePermission()->remove(["agent_id" => "example", "id" => "example_id", "organization_id" => "example"]);

Python

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

agent_write_permissions = client.AgentWritePermission().list({"agent_id": "example", "organization_id": "example"})
client.AgentWritePermission().remove({"agent_id": "example", "id": "example_id", "organization_id": "example"})

Ruby

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

agent_write_permissions = client.AgentWritePermission.list({ "agent_id" => "example", "organization_id" => "example" })
client.AgentWritePermission.remove({ "agent_id" => "example", "id" => "example_id", "organization_id" => "example" })

TypeScript

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

const agent_write_permissions = await client.AgentWritePermission().list({ agent_id: "example", organization_id: "example" })
await client.AgentWritePermission().remove({ agent_id: "example", id: "example_id", organization_id: "example" })

Fields

Field Type Required Description
account string Yes Whose account the writes run as, as the preview named it, such as Maya Chen through Linear.
granted_at string Yes Granted At
granted_by one,string,null Yes Granted By
id string Yes Id
in_effect boolean Yes Whether the permission approves writes now.
last_used_at one,string,null Yes Last Used At
tool string Yes The tool the agent writes with, such as linear.update_issue.

list

GET /api/v1/organizations/{organization_id}/agents/{id}/write_permissions

Operation ID: write_permissions_api_v1_organization_persistent_agent.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes

Responses

200: The agent's write permissions, by tool

application/json

Property Type Required Description
items array of object Yes
items[].account string Yes Whose account the writes run as, as the preview named it, such as Maya Chen through Linear.
items[].granted_at string (date-time) Yes
items[].granted_by string,null Yes
items[].id string Yes
items[].in_effect boolean Yes Whether the permission approves writes now. False once the person who gave it can no longer manage the agent.
items[].last_used_at string,null (date-time) Yes
items[].tool string Yes The tool the agent writes with, such as linear.update_issue.
401: Authentication required
403: Settings authority required
404: Organization or agent not found

remove

DELETE /api/v1/organizations/{organization_id}/agents/{id}/write_permissions/{write_permission_id}

Operation ID: write_permission_api_v1_organization_persistent_agent.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes
write_permission_id path string Yes

Responses

204: The permission is removed
401: Authentication required
403: Settings authority required
404: Organization, agent or permission not found