> ## 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.

# messages_batch_modify

> Modify labels on multiple messages at once.

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

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

result = await gmail.messages_batch_modify.ainvoke({"body": ...})
```

<Note>
  Requires `https://www.googleapis.com/auth/gmail.modify`. Costs 50 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> |
</div>

## Body

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