> ## Documentation Index
> Fetch the complete documentation index at: https://docs.r28.ai/charter/llms.txt
> Use this file to discover all available pages before exploring further.

# threads_modify

> Modify the labels on a thread, and so on every message in it.

<div className="tool-route"><span className="tool-row-method" data-method="POST">POST</span><code>{"https://gmail.googleapis.com/gmail/v1/users/{userId}/threads/{id}/modify"}</code></div>

```python gmail_threads_modify.py theme={null}
from charter.packs import gmail

result = await gmail.threads_modify.ainvoke({"id": ..., "body": ...})
```

<Note>
  Requires `https://www.googleapis.com/auth/gmail.modify`. Costs 10 against the provider's own quota.
</Note>

## Path parameters

<div className="reference-table">
  | Field                                                      | Type     | Description                                                                                                                                                    |
  | ---------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `userId`                                                   | `string` | The user's email address. The special value 'me' can be used to indicate the authenticated user. <span className="field-constraints">defaults to `"me"`</span> |
  | `id` <span className="required" title="required">\*</span> | `string` | The ID of the thread to modify.                                                                                                                                |
</div>

## Body

<div className="reference-table">
  | Field                                                        | Type                                                                           | Description              |
  | ------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------ |
  | `body` <span className="required" title="required">\*</span> | [ModifyThreadRequest](/charter/charter/packs/gmail/thread/objects#modifythreadrequest) | The modify request body. |
</div>
