# Create an 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="create\_account.py" %}

```python
from smtppy import SMTPDevClient

client = SMTPDevClient(api_key="YOUR_API_KEY")

account = client.create_account(address="user@example.com", password="strong-password")
print(account)
```

{% endcode %}

### Tham số

| Tên        | Kiểu  | Bắt buộc | Mô tả                              |
| ---------- | ----- | -------- | ---------------------------------- |
| `address`  | `str` | ✅        | Email address tạo mailbox/account. |
| `password` | `str` | ✅        | Password cho account.              |

### Giá trị trả về

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

{% hint style="warning" %}
Nếu thiếu `address` hoặc `password`, client sẽ raise `ValueError("Both address and password are required")`.
{% endhint %}

{% hint style="info" %}
Account/password chỉ được validate ở mức tối thiểu trong client. Các rule chi tiết phụ thuộc API.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://reno.gitbook.io/smtp-py/account/usage-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
