# driveItems.updateShare

Change an existing share grant's permission.

`PATCH /api/v1/drive-items/{itemId}/access/{email}`

- SDK: [`tb.driveItems.updateShare(input)`](/sdk)
- CLI: [`thinkbench drive-items update-share`](/cli)
- MCP tool: [`drive_items_update_share`](/mcp)

## Input

| Field | Type | In | Description |
| --- | --- | --- | --- |
| `itemId` | `string` | path |  |
| `email` | `string` | path |  |
| `permission` | `"read_write"` \| `"read_only"` | body |  |

## Output

Returns an empty response on success.

## Examples

### curl

```bash
curl -X PATCH "https://app.thinkbench.com/api/v1/drive-items/<itemId>/access/<email>" \
  -H "x-api-key: $THINKBENCH_API_KEY" \
  -H "content-type: application/json" \
  -d '{"permission":"read_write"}'
```

### TypeScript SDK

```ts
await tb.driveItems.updateShare({ itemId: "<itemId>", email: "ada@example.com", permission: "read_write" });
```

### CLI

```bash
thinkbench drive-items update-share --item-id "<itemId>" --email "ada@example.com" --permission "read_write"
```

### MCP

```json
{
  "name": "drive_items_update_share",
  "arguments": {
    "itemId": "<itemId>",
    "email": "ada@example.com",
    "permission": "read_write"
  }
}
```
