> For the complete documentation index, see [llms.txt](https://reno.gitbook.io/smtp-py/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://reno.gitbook.io/smtp-py/mailboxes/usage.md).

# List Mailboxes

Gets all the Mailbox resources of a given account.

### Mục lục nhanh

* [Ví dụ](#vi-du)
* [Tham số](#tham-so)
* [Giá trị trả về](#gia-tri-tra-ve)

### Ví dụ

{% code title="list\_mailboxes.py" %}

```python
from smtppy import SMTPDevClient

client = SMTPDevClient(api_key="YOUR_API_KEY")

mailboxes = client.list_mailboxes(account_id="acc_123", page=1)
print(mailboxes)
```

{% endcode %}

### Tham số

| Tên          | Kiểu  | Bắt buộc | Mặc định | Mô tả                    |
| ------------ | ----- | -------- | -------- | ------------------------ |
| `account_id` | `str` | ✅        | -        | Account identifier.      |
| `page`       | `int` | ❌        | `1`      | Số trang của collection. |

### Giá trị trả về

`dict[str, Any]` (JSON do API trả về).

```json
{
  "member": [
    {
      "@context": "string",
      "@id": "string",
      "@type": "string",
      "id": "string",
      "path": "string",
      "isSystem": false,
      "autoDeleteEnabled": false,
      "autoDeleteSeconds": 0,
      "totalMessages": 0,
      "totalUnreadMessages": 0,
      "account": "string",
      "createdAt": "2025-04-07T05:53:58.747Z",
      "updatedAt": "2025-04-07T05:53:58.748Z"
    }
  ],
  "totalItems": 0,
  "view": {
    "@id": "string",
    "type": "string",
    "first": "string",
    "last": "string",
    "previous": "string",
    "next": "string"
  },
  "search": {
    "@type": "string",
    "template": "string",
    "variableRepresentation": "string",
    "mapping": [
      {
        "@type": "string",
        "variable": "string",
        "property": "string",
        "required": true
      }
    ]
  }
}
```
