{"id":40904898,"url":"https://github.com/mailersend/mailersend-python","last_synced_at":"2026-01-22T02:37:26.687Z","repository":{"id":37084682,"uuid":"312432902","full_name":"mailersend/mailersend-python","owner":"mailersend","description":"The official MailerSend Python SDK","archived":false,"fork":false,"pushed_at":"2025-12-28T16:14:11.000Z","size":1297,"stargazers_count":67,"open_issues_count":8,"forks_count":15,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-31T05:43:13.142Z","etag":null,"topics":["mail","mailersend","python","transactional-emails"],"latest_commit_sha":null,"homepage":"https://developers.mailersend.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mailersend.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-11-13T00:44:35.000Z","updated_at":"2025-12-25T18:53:15.000Z","dependencies_parsed_at":"2025-12-08T05:04:07.207Z","dependency_job_id":null,"html_url":"https://github.com/mailersend/mailersend-python","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/mailersend/mailersend-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailersend%2Fmailersend-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailersend%2Fmailersend-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailersend%2Fmailersend-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailersend%2Fmailersend-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mailersend","download_url":"https://codeload.github.com/mailersend/mailersend-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailersend%2Fmailersend-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28651809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mail","mailersend","python","transactional-emails"],"created_at":"2026-01-22T02:37:26.617Z","updated_at":"2026-01-22T02:37:26.678Z","avatar_url":"https://github.com/mailersend.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://www.mailersend.com\"\u003e\u003cimg src=\"https://www.mailersend.com/images/logo.svg\" width=\"200px\"/\u003e\u003c/a\u003e\n\nMailerSend Python SDK\n\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\n# Table of Contents\n- [Table of Contents](#table-of-contents)\n- [Installation](#installation)\n  - [Requirements](#requirements)\n  - [Authentication](#authentication)\n    - [Environment Variable (Recommended)](#environment-variable-recommended)\n      - [Option 1: System Environment Variable](#option-1-system-environment-variable)\n      - [Option 2: Using .env File](#option-2-using-env-file)\n    - [Direct API Key](#direct-api-key)\n- [SDK Architecture](#sdk-architecture)\n  - [Builder Pattern](#builder-pattern)\n  - [Resource Classes](#resource-classes)\n  - [Request and Response Models](#request-and-response-models)\n- [Response Data Access](#response-data-access)\n  - [Multiple Access Patterns](#multiple-access-patterns)\n    - [Dict-like Access](#dict-like-access)\n    - [Attribute Access](#attribute-access)\n    - [Safe Access with Defaults](#safe-access-with-defaults)\n    - [Handling Method Name Conflicts](#handling-method-name-conflicts)\n  - [Data Format Conversion](#data-format-conversion)\n    - [Convert to Dictionary](#convert-to-dictionary)\n    - [Convert to JSON](#convert-to-json)\n    - [Extract Raw Data](#extract-raw-data)\n  - [Headers and Metadata](#headers-and-metadata)\n    - [Access Response Headers](#access-response-headers)\n    - [Response Metadata](#response-metadata)\n  - [Error Handling with Responses](#error-handling-with-responses)\n    - [Check Response Status](#check-response-status)\n    - [Access Error Information](#access-error-information)\n    - [Working with Different Response Types](#working-with-different-response-types)\n- [Logging](#logging)\n  - [Enable Debug Logging](#enable-debug-logging)\n  - [Custom Logging Configuration](#custom-logging-configuration)\n- [Usage](#usage)\n  - [Email](#email)\n    - [Send an email](#send-an-email)\n    - [Add CC, BCC recipients](#add-cc-bcc-recipients)\n    - [Send a template-based email](#send-a-template-based-email)\n    - [Personalization](#personalization)\n    - [Send email with attachment](#send-email-with-attachment)\n    - [Send bulk email](#send-bulk-email)\n    - [Get bulk email status](#get-bulk-email-status)\n  - [Activity](#activity)\n    - [Get a list of activities](#get-a-list-of-activities)\n    - [Get activity with filters](#get-activity-with-filters)\n    - [Get a single activity](#get-a-single-activity)\n  - [Analytics](#analytics)\n    - [Activity data by date](#activity-data-by-date)\n    - [Opens by country](#opens-by-country)\n    - [Opens by user-agent name](#opens-by-user-agent-name)\n    - [Opens by reading environment](#opens-by-reading-environment)\n  - [Domains](#domains)\n    - [Get a list of domains](#get-a-list-of-domains)\n    - [Get a single domain](#get-a-single-domain)\n    - [Add a domain](#add-a-domain)\n    - [Delete a domain](#delete-a-domain)\n    - [Get a list of recipients per domain](#get-a-list-of-recipients-per-domain)\n    - [Update domain settings](#update-domain-settings)\n    - [Get DNS Records](#get-dns-records)\n    - [Verify a domain](#verify-a-domain)\n  - [Sender Identities](#sender-identities)\n    - [Get a list of sender identities](#get-a-list-of-sender-identities)\n    - [Get a sender identity](#get-a-sender-identity)\n    - [Create a sender identity](#create-a-sender-identity)\n    - [Update a sender identity](#update-a-sender-identity)\n    - [Update a sender identity by email](#update-a-sender-identity-by-email)\n    - [Delete a sender identity](#delete-a-sender-identity)\n    - [Delete a sender identity by email](#delete-a-sender-identity-by-email)\n  - [Inbound Routes](#inbound-routes)\n    - [Get a list of inbound routes](#get-a-list-of-inbound-routes)\n    - [Get a single inbound route](#get-a-single-inbound-route)\n    - [Add an inbound route](#add-an-inbound-route)\n    - [Update an inbound route](#update-an-inbound-route)\n    - [Delete an inbound route](#delete-an-inbound-route)\n  - [Messages](#messages)\n    - [Get a list of messages](#get-a-list-of-messages)\n    - [Get a single message](#get-a-single-message)\n  - [Scheduled messages](#scheduled-messages)\n    - [Get a list of scheduled messages](#get-a-list-of-scheduled-messages)\n    - [Get a single scheduled message](#get-a-single-scheduled-message)\n    - [Delete a scheduled message](#delete-a-scheduled-message)\n  - [Recipients](#recipients)\n    - [Get a list of recipients](#get-a-list-of-recipients)\n    - [Get a single recipient](#get-a-single-recipient)\n    - [Delete a recipient](#delete-a-recipient)\n    - [Get recipients from a blocklist](#get-recipients-from-a-blocklist)\n    - [Get recipients from hard bounces](#get-recipients-from-hard-bounces)\n    - [Get recipients from spam complaints](#get-recipients-from-spam-complaints)\n    - [Get recipients from unsubscribes](#get-recipients-from-unsubscribes)\n    - [Add recipients to blocklist](#add-recipients-to-blocklist)\n    - [Add hard bounced recipients](#add-hard-bounced-recipients)\n    - [Add spam complaints](#add-spam-complaints)\n    - [Add recipients to unsubscribe list](#add-recipients-to-unsubscribe-list)\n    - [Delete recipients from blocklist](#delete-recipients-from-blocklist)\n    - [Delete hard bounced recipients](#delete-hard-bounced-recipients)\n    - [Delete spam complaints](#delete-spam-complaints)\n    - [Delete recipients from unsubscribe list](#delete-recipients-from-unsubscribe-list)\n  - [Templates](#templates)\n    - [Get a list of templates](#get-a-list-of-templates)\n    - [Get a single template](#get-a-single-template)\n    - [Delete template](#delete-template)\n  - [Webhooks](#webhooks)\n    - [Get a list of webhooks](#get-a-list-of-webhooks)\n    - [Get a single webhook](#get-a-single-webhook)\n    - [Create a Webhook](#create-a-webhook)\n    - [Create a disabled webhook](#create-a-disabled-webhook)\n    - [Update a Webhook](#update-a-webhook)\n    - [Disable/Enable a Webhook](#disableenable-a-webhook)\n    - [Delete a Webhook](#delete-a-webhook)\n  - [Email Verification](#email-verification)\n    - [Get all email verification lists](#get-all-email-verification-lists)\n    - [Get a single email verification list](#get-a-single-email-verification-list)\n    - [Create an email verification list](#create-an-email-verification-list)\n    - [Verify a list](#verify-a-list)\n    - [Get list results](#get-list-results)\n  - [Webhooks](#webhooks-1)\n    - [Get a list of webhooks](#get-a-list-of-webhooks-1)\n    - [Get a single webhook](#get-a-single-webhook-1)\n    - [Create a Webhook](#create-a-webhook-1)\n    - [Create a disabled webhook](#create-a-disabled-webhook-1)\n    - [Update a Webhook](#update-a-webhook-1)\n    - [Disable/Enable a Webhook](#disableenable-a-webhook-1)\n    - [Delete a Webhook](#delete-a-webhook-1)\n  - [Email Verification](#email-verification-1)\n    - [Get all email verification lists](#get-all-email-verification-lists-1)\n    - [Get a single email verification list](#get-a-single-email-verification-list-1)\n    - [Create an email verification list](#create-an-email-verification-list-1)\n    - [Verify a list](#verify-a-list-1)\n    - [Get list results](#get-list-results-1)\n  - [SMS](#sms)\n    - [Sending SMS messages](#sending-sms-messages)\n  - [SMS Activity](#sms-activity)\n    - [Get a list of SMS activities](#get-a-list-of-sms-activities)\n    - [Get activity of a single SMS message](#get-activity-of-a-single-sms-message)\n  - [SMS Phone Numbers](#sms-phone-numbers)\n    - [Get a list of SMS phone numbers](#get-a-list-of-sms-phone-numbers)\n    - [Get an SMS phone number](#get-an-sms-phone-number)\n    - [Update a single SMS phone number](#update-a-single-sms-phone-number)\n    - [Delete an SMS phone number](#delete-an-sms-phone-number)\n  - [SMS Recipients](#sms-recipients)\n    - [Get a list of SMS recipients](#get-a-list-of-sms-recipients)\n    - [Get an SMS recipient](#get-an-sms-recipient)\n    - [Update a single SMS recipient](#update-a-single-sms-recipient)\n  - [SMS Messages](#sms-messages)\n    - [Get a list of SMS messages](#get-a-list-of-sms-messages)\n    - [Get an SMS message](#get-an-sms-message)\n  - [SMS Webhooks](#sms-webhooks)\n    - [Get a list of SMS webhooks](#get-a-list-of-sms-webhooks)\n    - [Get a single SMS webhook](#get-a-single-sms-webhook)\n    - [Create an SMS webhook](#create-an-sms-webhook)\n    - [Update a single SMS webhook](#update-a-single-sms-webhook)\n    - [Delete an SMS webhook](#delete-an-sms-webhook)\n  - [SMS Inbound Routing](#sms-inbound-routing)\n    - [Get a list of SMS inbound routes](#get-a-list-of-sms-inbound-routes)\n    - [Get a single SMS inbound route](#get-a-single-sms-inbound-route)\n    - [Create an SMS inbound route](#create-an-sms-inbound-route)\n    - [Update an SMS inbound route](#update-an-sms-inbound-route)\n    - [Delete an SMS inbound route](#delete-an-sms-inbound-route)\n  - [Tokens](#tokens)\n    - [Create a token](#create-a-token)\n    - [Pause / Unpause Token](#pause--unpause-token)\n    - [Delete a Token](#delete-a-token)\n  - [SMTP Users](#smtp-users)\n    - [Get a list of SMTP users](#get-a-list-of-smtp-users)\n    - [Get a single SMTP user](#get-a-single-smtp-user)\n    - [Create an SMTP user](#create-an-smtp-user)\n    - [Update an SMTP user](#update-an-smtp-user)\n    - [Delete an SMTP user](#delete-an-smtp-user)\n  - [Users](#users)\n    - [Get a list of account users](#get-a-list-of-account-users)\n    - [Get a single account user](#get-a-single-account-user)\n    - [Invite a user to account](#invite-a-user-to-account)\n    - [Update an account user](#update-an-account-user)\n    - [Delete a user from account](#delete-a-user-from-account)\n    - [Get a list of invites](#get-a-list-of-invites)\n    - [Get a single invite](#get-a-single-invite)\n    - [Resend an invite](#resend-an-invite)\n    - [Cancel an invite](#cancel-an-invite)\n  - [Other Endpoints](#other-endpoints)\n    - [Get API Quota](#get-api-quota)\n- [Error Handling](#error-handling)\n- [Testing](#testing)\n  - [Running Unit Tests](#running-unit-tests)\n  - [Testing with VCR](#testing-with-vcr)\n- [Available endpoints](#available-endpoints)\n- [Support and Feedback](#support-and-feedback)\n- [License](#license)\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\n\n# Installation\n\n```bash\npip install mailersend\n```\n\n## Requirements\n\n- Python 3.7+\n- An API Key from [mailersend.com](https://www.mailersend.com)\n\n## Authentication\n\nThe SDK supports multiple authentication methods:\n\n### Environment Variable (Recommended)\n\n#### Option 1: System Environment Variable\n\nSet your API key as a system environment variable:\n\n```bash\nexport MAILERSEND_API_KEY=\"your-api-key\"\n```\n\nThen initialize the client:\n\n```python\nfrom mailersend import MailerSendClient\n\n# Automatically uses MAILERSEND_API_KEY environment variable\nms = MailerSendClient()\n```\n\n#### Option 2: Using .env File\n\nFor development, you can use a `.env` file. First install `python-dotenv`:\n\n```bash\npip install python-dotenv\n```\n\nCreate a `.env` file in your project root:\n\n```bash\n# .env\nMAILERSEND_API_KEY=your-api-key\n```\n\nThen load it in your Python code:\n\n```python\nfrom mailersend import MailerSendClient\nfrom dotenv import load_dotenv\n\n# Load environment variables from .env file\nload_dotenv()\n\n# Client automatically uses the loaded MAILERSEND_API_KEY\nms = MailerSendClient()\n```\n\n### Direct API Key\n\n```python\nfrom mailersend import MailerSendClient\n\nms = MailerSendClient(api_key=\"your-api-key\")\n```\n\n\u003ca name=\"sdk-architecture\"\u003e\u003c/a\u003e\n\n# SDK Architecture\n\nThe MailerSend Python SDK v2 introduces a modern, clean architecture that follows industry best practices:\n\n## Builder Pattern\n\nThe SDK uses the builder pattern for constructing API requests. This provides a fluent, readable interface for setting parameters:\n\n```python\nfrom mailersend import MailerSendClient\nfrom mailersend import SmsRecipientsBuilder\n\nms = MailerSendClient()\n\n# Build a request using the fluent builder pattern\nrequest = (SmsRecipientsBuilder()\n          .sms_number_id(\"sms123\")\n          .status(\"active\")\n          .page(1)\n          .limit(25)\n          .build_list_request())\n\n# Execute the request\nresponse = ms.sms_recipients.list_sms_recipients(request)\n```\n\n## Resource Classes\n\nEach API endpoint group has its own resource class that provides clean method interfaces:\n\n```python\n# Access different API resources\nms.sms_recipients    # SMS Recipients operations\nms.sms_webhooks      # SMS Webhooks operations  \nms.sms_inbounds      # SMS Inbound Routing operations\nms.email             # Email operations\nms.domains           # Domain operations\n# ... and more\n```\n\n## Request and Response Models\n\nAll data is validated using Pydantic models ensuring type safety and data integrity:\n\n```python\n# All responses are strongly typed\nresponse = ms.sms_recipients.get_sms_recipient(request)\nprint(response.id)           # Validated string\nprint(response.number)       # Validated phone number\nprint(response.created_at)   # Validated datetime object\n```\n\n\u003ca name=\"response-data-access\"\u003e\u003c/a\u003e\n\n# Response Data Access\n\nThe MailerSend SDK provides flexible ways to access and work with API response data. All API calls return a unified `APIResponse` object that supports multiple access patterns and data formats.\n\n## Multiple Access Patterns\n\n### Dict-like Access\nAccess response data using dictionary-style syntax:\n\n```python\nfrom mailersend import MailerSendClient\nfrom mailersend import SmsRecipientsBuilder\n\nms = MailerSendClient()\nrequest = SmsRecipientsBuilder().sms_recipient_id(\"recipient-123\").build_get_request()\nresponse = ms.sms_recipients.get_sms_recipient(request)\n\n# Dict-style access\nrecipient_id = response[\"data\"][\"id\"]\nphone_number = response[\"data\"][\"number\"]\nstatus = response[\"data\"][\"status\"]\n\n# Nested access\nif \"sms\" in response[\"data\"]:\n    latest_sms = response[\"data\"][\"sms\"][0][\"text\"]\n\n# Check if key exists\nif \"error\" in response:\n    error_message = response['error']\n```\n\n### Attribute Access\nAccess data using dot notation for cleaner code:\n\n```python\n# Attribute-style access (most convenient)\nrecipient_id = response.id\nphone_number = response.number\nstatus = response.status\n\n# Nested attribute access for complex data\nif hasattr(response, 'sms') and response.sms:\n    latest_sms = response.sms[0].text\n```\n\n### Safe Access with Defaults\nUse the `get()` method for safe access with fallback values:\n\n```python\n# Safe access with defaults\nrecipient_id = response.get(\"data\", {}).get(\"id\", \"unknown\")\nerror_message = response.get(\"error\", \"No error\")\n\n# Safe nested access\nmeta_info = response.get(\"meta\", {})\ntotal_count = meta_info.get(\"total\", 0)\ncurrent_page = meta_info.get(\"page\", 1)\n```\n\n### Handling Method Name Conflicts\nWhen response data contains fields that conflict with built-in methods, use the `data_` prefix:\n\n```python\n# If response contains fields like 'items', 'keys', 'values', etc.\nresponse_data = {\n    \"items\": [{\"id\": 1, \"name\": \"Item 1\"}],\n    \"keys\": [\"key1\", \"key2\"],\n    \"values\": [100, 200]\n}\n\n# Use dict access (recommended for conflicts)\nitems_list = response[\"items\"]\nkey_list = response[\"keys\"]\n\n# Or use data_ prefix for attribute access\nitems_list = response.data_items\nkey_list = response.data_keys\nvalue_list = response.data_values\n```\n\n## Data Format Conversion\n\n### Convert to Dictionary\nGet the complete response as a dictionary:\n\n```python\n# Convert entire response to dict\nresponse_dict = response.to_dict()\n# Returns:\n# {\n#     \"data\": {\"id\": \"123\", \"number\": \"+1234567890\", ...},\n#     \"headers\": {\"x-request-id\": \"req-456\", ...},\n#     \"status_code\": 200,\n#     \"request_id\": \"req-456\",\n#     \"rate_limit_remaining\": 1000,\n#     \"success\": True\n# }\n\n# Or use dict() constructor\nresponse_dict = dict(response)\n\n# Access specific parts\ndata_only = response_dict[\"data\"]\nheaders_only = response_dict[\"headers\"]\n```\n\n### Convert to JSON\nGet JSON string representation with various formatting options:\n\n```python\n# Compact JSON\njson_string = response.to_json()\n\n# Pretty-printed JSON with indentation\npretty_json = response.to_json(indent=2)\n\n# Custom JSON options\nunicode_json = response.to_json(ensure_ascii=False, indent=4)\n\n# Direct json.dumps() also works\nimport json\njson_string = json.dumps(response)\n```\n\n### Extract Raw Data\nAccess just the API response data without metadata:\n\n```python\n# Get raw response data\nraw_data = response.data\n\n# For paginated responses\nif isinstance(raw_data, dict) and \"data\" in raw_data:\n    items = raw_data[\"data\"]        # List of items\n    meta = raw_data.get(\"meta\", {}) # Pagination info\n    links = raw_data.get(\"links\", {}) # Pagination links\nelse:\n    # Single item response\n    item_data = raw_data\n```\n\n## Headers and Metadata\n\n### Access Response Headers\nHeaders can be accessed in multiple ways with automatic case handling:\n\n```python\n# Dictionary-style access (case-sensitive)\nrequest_id = response.headers[\"x-request-id\"]\ncontent_type = response.headers[\"content-type\"]\n\n# Attribute-style access (dashes become underscores)\nrequest_id = response.headers.x_request_id\ncontent_type = response.headers.content_type\nrate_limit = response.headers.x_rate_limit_remaining\n\n# Nested dictionary access\nrequest_id = response[\"headers\"][\"x-request-id\"]\n\n# Safe access with defaults\nretry_after = response.headers.get(\"retry-after\", \"0\")\n```\n\n### Response Metadata\nAccess useful metadata about the API response:\n\n```python\n# HTTP status information\nstatus_code = response.status_code\nis_successful = response.success  # True for 2xx status codes\n\n# Rate limiting information\nremaining_requests = response.rate_limit_remaining\nretry_delay = response.retry_after  # Seconds to wait before retry\n\n# Request tracking\nrequest_id = response.request_id\n\n# Pagination (for list responses)\nif \"meta\" in response.data:\n    total_items = response.data[\"meta\"][\"total\"]\n    current_page = response.data[\"meta\"][\"current_page\"]\n    per_page = response.data[\"meta\"][\"per_page\"]\n```\n\n## Error Handling with Responses\n\n### Check Response Status\nAlways check if the response was successful:\n\n```python\nfrom mailersend import MailerSendClient, EmailBuilder\n\nms = MailerSendClient()\n\ntry:\n    email = EmailBuilder().from_email(\"sender@domain.com\").build()\n    response = ms.emails.send(email)\n    \n    if response.success:\n        email_id = response.id\n        remaining_quota = response.rate_limit_remaining\n    else:\n        status_code = response.status_code\n        error_details = response.data\n        \n        # Handle rate limiting\n        if response.status_code == 429 and response.retry_after:\n            retry_seconds = response.retry_after\n            \nexcept Exception as e:\n    # Handle exception\n```\n\n### Access Error Information\nWhen requests fail, error details are available in the response:\n\n```python\nif not response.success:\n    error_data = response.data\n    \n    # API error response structure\n    error_message = error_data.get(\"message\", \"Unknown error\")\n    error_code = error_data.get(\"code\")\n    \n    # Validation errors (422 responses)\n    if \"errors\" in error_data:\n        for field, messages in error_data[\"errors\"].items():\n            validation_errors = {field: messages}\n```\n\n### Working with Different Response Types\n\n```python\n# Single item responses (get operations)\nuser_response = ms.users.get_user(request)\nif user_response.success:\n    user_name = user_response.name\n    user_email = user_response.email\n\n# List responses (paginated)\nusers_response = ms.users.list_users(request)\nif users_response.success:\n    users = users_response.data[\"data\"]  # Array of users\n    total_count = users_response.data[\"meta\"][\"total\"]\n    \n    for user in users:\n        user_name = user['name']\n        user_email = user['email']\n\n# Empty responses (delete operations)\ndelete_response = ms.users.delete_user(request)\nif delete_response.success:\n    # delete_response.data is typically empty or contains confirmation\n    deletion_confirmed = True\n```\n\n\u003ca name=\"logging\"\u003e\u003c/a\u003e\n\n# Logging\n\nThe SDK includes comprehensive logging to help with debugging and monitoring:\n\n## Enable Debug Logging\n\n```python\nimport logging\nfrom mailersend import MailerSendClient\n\n# Enable debug logging\nlogging.basicConfig(level=logging.DEBUG)\n\nms = MailerSendClient()\n\n# All API calls will now be logged with detailed information\n```\n\n## Custom Logging Configuration\n\n```python\nimport logging\nfrom mailersend import MailerSendClient\n\n# Configure logging with custom format\nlogging.basicConfig(\n    level=logging.INFO,\n    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',\n    handlers=[\n        logging.FileHandler('mailersend.log'),\n        logging.StreamHandler()\n    ]\n)\n\nms = MailerSendClient()\n\n# Logs will include:\n# - API request details\n# - Response status codes\n# - Parameter information\n# - Error details\n```\n\n\u003ca name=\"usage\"\u003e\u003c/a\u003e\n\n# Usage\n\n## Email\n\n### Send an email\n\n```python\nfrom mailersend import MailerSendClient, EmailBuilder\n\nms = MailerSendClient()\n\nemail = (EmailBuilder()\n         .from_email(\"sender@domain.com\", \"Your Name\")\n         .to_many([{\"email\": \"recipient@domain.com\", \"name\": \"Recipient\"}])\n         .subject(\"Hello from MailerSend!\")\n         .html(\"\u003ch1\u003eHello World!\u003c/h1\u003e\")\n         .text(\"Hello World!\")\n         .build())\n\nresponse = ms.emails.send(email)\n```\n\n### Add CC, BCC recipients\n\n```python\nfrom mailersend import MailerSendClient, EmailBuilder\n\nms = MailerSendClient()\n\nemail = (EmailBuilder()\n         .from_email(\"sender@domain.com\", \"Your Name\")\n         .to_many([{\"email\": \"recipient@domain.com\", \"name\": \"Recipient\"}])\n         .cc([\n            {\"email\": \"cc1@example.com\", \"name\": \"CC User 1\"},\n            {\"email\": \"cc2@example.com\", \"name\": \"CC User 2\"}\n         ])\n         .bcc([\n            {\"email\": \"bcc1@example.com\", \"name\": \"BCC User 1\"},\n            {\"email\": \"bcc2@example.com\"}\n         ])\n         .subject(\"Hello with CC/BCC!\")\n         .html(\"\u003ch1\u003eHello World!\u003c/h1\u003e\")\n         .build())\n\nresponse = ms.emails.send(email)\n```\n\n### Send a template-based email\n\n```python\nfrom mailersend import MailerSendClient, EmailBuilder\n\nms = MailerSendClient()\n\nemail = (EmailBuilder()\n         .from_email(\"sender@domain.com\", \"Your Name\")\n         .to_many([{\"email\": \"recipient@domain.com\", \"name\": \"Recipient\"}])\n         .template(\"template-id\")\n         .personalize_many([{\n             \"email\": \"recipient@domain.com\",\n             \"data\": {\n                 \"name\": \"John\",\n                 \"company\": \"MailerSend\"\n             }\n         }])\n         .build())\n\nresponse = ms.emails.send(email)\n```\n\n### Personalization\n\n```python\nfrom mailersend import MailerSendClient, EmailBuilder\n\nms = MailerSendClient()\n\nemail = (EmailBuilder()\n         .from_email(\"sender@domain.com\", \"Your Name\")\n         .to_many([{\"email\": \"recipient@domain.com\", \"name\": \"Recipient\"}])\n         .subject(\"Hello {$name}!\")\n         .html(\"\u003ch1\u003eHello {$name} from {$company}!\u003c/h1\u003e\")\n         .personalize_many([{\n             \"email\": \"recipient@domain.com\",\n             \"data\": {\n                 \"name\": \"John\",\n                 \"company\": \"MailerSend\",\n                 \"items\": [\"item1\", \"item2\"],\n                 \"total\": 99.99\n             }\n         }])\n         .build())\n\nresponse = ms.emails.send(email)\n```\n\n### Send email with attachment\n\n```python\nfrom mailersend import MailerSendClient, EmailBuilder\n\nms = MailerSendClient()\n\nemail = (EmailBuilder()\n         .from_email(\"sender@domain.com\", \"Your Name\")\n         .to_many([{\"email\": \"recipient@domain.com\", \"name\": \"Recipient\"}])\n         .subject(\"Email with attachment\")\n         .html(\"\u003ch1\u003ePlease find attached document\u003c/h1\u003e\")\n         .attach_file(\"document.pdf\")\n         .build())\n\nresponse = ms.emails.send(email)\n```\n\n### Send bulk email\n\n```python\nfrom mailersend import MailerSendClient, EmailBuilder\n\nms = MailerSendClient()\n\n# Create individual EmailRequest objects\nemails = [\n    EmailBuilder()\n        .from_email(\"sender@domain.com\", \"Sender\")\n        .to_many([{\"email\": \"recipient1@domain.com\", \"name\": \"Recipient 1\"}])\n        .subject(\"Bulk email 1\")\n        .html(\"\u003ch1\u003eHello from bulk email 1\u003c/h1\u003e\")\n        .text(\"Hello from bulk email 1\")\n        .build(),\n    EmailBuilder()\n        .from_email(\"sender@domain.com\", \"Sender\")\n        .to_many([{\"email\": \"recipient2@domain.com\", \"name\": \"Recipient 2\"}])\n        .subject(\"Bulk email 2\")\n        .html(\"\u003ch1\u003eHello from bulk email 2\u003c/h1\u003e\")\n        .text(\"Hello from bulk email 2\")\n        .build()\n]\n\nresponse = ms.emails.send_bulk(emails)\n```\n\n### Get bulk email status\n\n```python\nfrom mailersend import MailerSendClient\n\nms = MailerSendClient()\n\nresponse = ms.emails.get_bulk_status(\"bulk-email-id\")\n```\n\n## Activity\n\n### Get a list of activities\n\n```python\nfrom mailersend import MailerSendClient, ActivityBuilder\nfrom datetime import datetime, timedelta\n\nms = MailerSendClient()\n\n# Get activities from last 7 days (maximum allowed timeframe)\ndate_from = int((datetime.now() - timedelta(days=7)).timestamp())\ndate_to = int(datetime.now().timestamp())\n\nrequest = (ActivityBuilder()\n          .domain_id(\"domain-id\")\n          .date_from(date_from)\n          .date_to(date_to)\n          .page(1)\n          .limit(25)\n          .build_list_request())\n\nresponse = ms.activities.get(request)\n```\n\n### Get activity with filters\n\n```python\nfrom mailersend import MailerSendClient, ActivityBuilder\nfrom datetime import datetime, timedelta\n\nms = MailerSendClient()\n\n# Get activities from last 7 days\ndate_from = int((datetime.now() - timedelta(days=7)).timestamp())\ndate_to = int(datetime.now().timestamp())\n\nrequest = (ActivityBuilder()\n          .domain_id(\"domain-id\")\n          .date_from(date_from)\n          .date_to(date_to)\n          .events([\"sent\", \"delivered\", \"opened\"])\n          .page(1)\n          .limit(50)\n          .build_list_request())\n\nresponse = ms.activities.get(request)\n```\n\n### Get a single activity\n\n```python\nfrom mailersend import MailerSendClient, SingleActivityBuilder\n\nms = MailerSendClient()\n\nrequest = (SingleActivityBuilder()\n          .activity_id(\"activity-id\")\n          .build_get_request())\n\nresponse = ms.activities.get_single(request)\n```\n\n## Analytics\n\n### Activity data by date\n\n```python\nfrom mailersend import MailerSendClient, AnalyticsBuilder\nfrom datetime import datetime, timedelta\n\nms = MailerSendClient()\n\ndate_from = int((datetime.now() - timedelta(days=30)).timestamp())\ndate_to = int(datetime.now().timestamp())\n\nrequest = (AnalyticsBuilder()\n          .date_from(date_from)\n          .date_to(date_to)\n          .events(\"sent\", \"delivered\", \"opened\")\n          .domain_id(\"domain-id\")\n          .group_by(\"days\")\n          .build())\n\nresponse = ms.analytics.get_activity_by_date(request)\n```\n\n### Opens by country\n\n```python\nfrom mailersend import MailerSendClient, AnalyticsBuilder\n\nms = MailerSendClient()\n\nrequest = (AnalyticsBuilder()\n          .date_from(date_from)\n          .date_to(date_to)\n          .domain_id(\"domain-id\")\n          .build())\n\nresponse = ms.analytics.get_opens_by_country(request)\n```\n\n### Opens by user-agent name\n\n```python\nfrom mailersend import MailerSendClient, AnalyticsBuilder\n\nms = MailerSendClient()\n\nrequest = (AnalyticsBuilder()\n          .date_from(date_from)\n          .date_to(date_to)\n          .domain_id(\"domain-id\")\n          .build())\n\nresponse = ms.analytics.get_opens_by_user_agent(request)\n```\n\n### Opens by reading environment\n\n```python\nfrom mailersend import MailerSendClient, AnalyticsBuilder\n\nms = MailerSendClient()\n\nrequest = (AnalyticsBuilder()\n          .date_from(date_from)\n          .date_to(date_to)\n          .domain_id(\"domain-id\")\n          .build())\n\nresponse = ms.analytics.get_opens_by_reading_environment(request)\n```\n\n## Domains\n\n### Get a list of domains\n\n```python\nfrom mailersend import MailerSendClient, DomainsBuilder\n\nms = MailerSendClient()\n\nrequest = (DomainsBuilder()\n          .page(1)\n          .limit(25)\n          .build_list_request())\n\nresponse = ms.domains.list_domains(request)\n```\n\n### Get a single domain\n\n```python\nfrom mailersend import MailerSendClient, DomainsBuilder\n\nms = MailerSendClient()\n\nrequest = (DomainsBuilder()\n          .domain_id(\"domain-id\")\n          .build_get_request())\n\nresponse = ms.domains.get_domain(request)\n```\n\n### Add a domain\n\n```python\nfrom mailersend import MailerSendClient, DomainsBuilder\n\nms = MailerSendClient()\n\nrequest = (DomainsBuilder()\n          .domain_name(\"mydomain.com\")\n          .return_path_subdomain(\"rp\")\n          .custom_tracking_subdomain(\"ct\")\n          .inbound_routing_subdomain(\"ir\")\n          .build_create_request())\n\nresponse = ms.domains.create_domain(request)\n```\n\n### Delete a domain\n\n```python\nfrom mailersend import MailerSendClient, DomainsBuilder\n\nms = MailerSendClient()\n\nrequest = (DomainsBuilder()\n          .domain_id(\"domain-id\")\n          .build_delete_request())\n\nresponse = ms.domains.delete_domain(request)\n```\n\n### Get a list of recipients per domain\n\n```python\nfrom mailersend import MailerSendClient, DomainsBuilder\n\nms = MailerSendClient()\n\nrequest = (DomainsBuilder()\n          .domain_id(\"domain-id\")\n          .page(1)\n          .limit(25)\n          .build_recipients_request())\n\nresponse = ms.domains.get_domain_recipients(request)\n```\n\n### Update domain settings\n\n```python\nfrom mailersend import MailerSendClient, DomainsBuilder\n\nms = MailerSendClient()\n\nrequest = (DomainsBuilder()\n          .domain_id(\"domain-id\")\n          .send_paused(False)\n          .track_clicks(True)\n          .track_opens(True)\n          .track_unsubscribe(True)\n          .track_content(True)\n          .custom_tracking_enabled(True)\n          .custom_tracking_subdomain(\"email\")\n          .precedence_bulk(False)\n          .build_update_settings_request())\n\nresponse = ms.domains.update_domain_settings(request)\n```\n\n### Get DNS Records\n\n```python\nfrom mailersend import MailerSendClient, DomainsBuilder\n\nms = MailerSendClient()\n\nrequest = (DomainsBuilder()\n          .domain_id(\"domain-id\")\n          .build_dns_records_request())\n\nresponse = ms.domains.get_domain_dns_records(request)\n```\n\n### Verify a domain\n\n```python\nfrom mailersend import MailerSendClient\nfrom mailersend import DomainsBuilder\n\nms = MailerSendClient()\n\nrequest = (DomainsBuilder()\n          .domain_id(\"domain-id\")\n          .build_verification_request())\n\nresponse = ms.domains.get_domain_verification_status(request)\n```\n\n## Sender Identities\n\n### Get a list of sender identities\n\n```python\nfrom mailersend import MailerSendClient, IdentityBuilder\n\nms = MailerSendClient()\n\nrequest = (IdentityBuilder()\n          .domain_id(\"domain-id\")\n          .build_list_request())\n\nresponse = ms.identities.list_identities(request)\n```\n\n### Get a sender identity\n\n```python\nfrom mailersend import MailerSendClient, IdentityBuilder\n\nms = MailerSendClient()\n\nrequest = (IdentityBuilder()\n          .identity_id(\"identity-id\")\n          .build_get_request())\n\nresponse = ms.identities.get_identity(request)\n```\n\n### Create a sender identity\n\n```python\nfrom mailersend import MailerSendClient, IdentityBuilder\n\nms = MailerSendClient()\n\nrequest = (IdentityBuilder()\n          .domain_id(\"domain-id\")\n          .name(\"John Doe\")\n          .email(\"john@yourdomain.com\")\n          .reply_to_email(\"support@yourdomain.com\")\n          .reply_to_name(\"Support Team\")\n          .add_note(True)\n          .build_create_request())\n\nresponse = ms.identities.create_identity(request)\n```\n\n### Update a sender identity\n\n```python\nfrom mailersend import MailerSendClient, IdentityBuilder\n\nms = MailerSendClient()\n\nrequest = (IdentityBuilder()\n          .identity_id(\"identity-id\")\n          .name(\"Jane Doe\")\n          .reply_to_email(\"support@yourdomain.com\")\n          .reply_to_name(\"Support Team\")\n          .add_note(True)\n          .build_update_request())\n\nresponse = ms.identities.update_identity(request)\n```\n\n### Update a sender identity by email\n\n```python\nfrom mailersend import MailerSendClient, IdentityBuilder\n\nms = MailerSendClient()\n\nrequest = (IdentityBuilder()\n          .email(\"support@yourdomain.com\")\n          .name(\"Doe Jane\")\n          .reply_to_email(\"support@yourdomain.com\")\n          .reply_to_name(\"Support Team\")\n          .add_note(True)\n          .build_update_by_email_request())\n\nresponse = ms.identities.update_identity(request)\n```\n\n### Delete a sender identity\n\n```python\nfrom mailersend import MailerSendClient, IdentityBuilder\n\nms = MailerSendClient()\n\nrequest = (IdentityBuilder()\n          .identity_id(\"identity-id\")\n          .build_delete_request())\n\nresponse = ms.identities.delete_identity(request)\n```\n\n### Delete a sender identity by email\n\n```python\nfrom mailersend import MailerSendClient, IdentityBuilder\n\nms = MailerSendClient()\n\nrequest = (IdentityBuilder()\n          .email(\"support@yourdomain.com\")\n          .build_delete_by_email_request())\n\nresponse = ms.identities.delete_identity_by_email(request)\n```\n\n## Inbound Routes\n\n### Get a list of inbound routes\n\n```python\nfrom mailersend import MailerSendClient, InboundBuilder\n\nms = MailerSendClient()\n\nrequest = (InboundBuilder()\n          .domain_id(\"domain-id\")\n          .build_list_request())\n\nresponse = ms.inbound.list(request)\n```\n\n### Get a single inbound route\n\n```python\nfrom mailersend import MailerSendClient, InboundBuilder\n\nms = MailerSendClient()\n\nrequest = (InboundBuilder()\n          .inbound_id(\"inbound-id\")\n          .build_get_request())\n\nresponse = ms.inbound.get(request)\n```\n\n### Add an inbound route\n\n```python\nfrom mailersend import MailerSendClient, InboundBuilder\n\nms = MailerSendClient()\n\nrequest = (InboundBuilder()\n          .domain_id(\"domain-id\")\n          .name(\"My Inbound Route\")\n          .domain_enabled(False)\n          .inbound_priority(1)\n          .catch_type(\"all\")\n          .match_type(\"all\")\n          .add_forward(\"email\", \"support@mycompany.com\")\n          .catch_recipient([{\"comparer\": \"equal\", \"value\": \"support\"}])\n          .add_match_filter(\"match_sender\", [{\"comparer\": \"equal\", \"value\": \"support\"}])\n          .add_webhook_forward(\"https://mycompany.com/webhook\")\n          .build_create_request())\n\nresponse = ms.inbound.create_inbound_route(request)\n```\n\n### Update an inbound route\n\n```python\nfrom mailersend import MailerSendClient, InboundBuilder\n\nms = MailerSendClient()\n\nrequest = (InboundBuilder()\n          .inbound_id(\"inbound-id\")\n          .name(\"Updated Route Name\")\n          .enabled(False)\n          .build_update_request())\n\nresponse = ms.inbound.update_inbound_route(request)\n```\n\n### Delete an inbound route\n\n```python\nfrom mailersend import MailerSendClient, InboundBuilder\n\nms = MailerSendClient()\n\nrequest = (InboundBuilder()\n          .inbound_id(\"inbound-id\")\n          .build_delete_request())\n\nresponse = ms.inbound.delete_inbound_route(request)\n```\n\n## Messages\n\n### Get a list of messages\n\n```python\nfrom mailersend import MailerSendClient, MessagesBuilder\n\nms = MailerSendClient()\n\nrequest = (MessagesBuilder()\n          .build_list_request())\n\nresponse = ms.messages.list_messages(request)\n```\n\n### Get a single message\n\n```python\nfrom mailersend import MailerSendClient, MessagesBuilder\n\nms = MailerSendClient()\n\nrequest = (MessagesBuilder()\n          .message_id(\"message-id\")\n          .build_get_request())\n\nresponse = ms.messages.get_message(request)\n```\n\n## Scheduled messages\n\n### Get a list of scheduled messages\n\n```python\nfrom mailersend import MailerSendClient, SchedulesBuilder\n\nms = MailerSendClient()\n\nrequest = (SchedulesBuilder()\n          .domain_id(\"domain-id\")\n          .build_list_request())\n\nresponse = ms.schedules.list_schedules(request)\n```\n\n### Get a single scheduled message\n\n```python\nfrom mailersend import MailerSendClient, SchedulesBuilder\n\nms = MailerSendClient()\n\nrequest = (SchedulesBuilder()\n          .message_id(\"scheduled-id\")\n          .build_get_request())\n\nresponse = ms.schedules.get_schedule(request)\n```\n\n### Delete a scheduled message\n\n```python\nfrom mailersend import MailerSendClient, SchedulesBuilder\n\nms = MailerSendClient()\n\nrequest = (SchedulesBuilder()\n          .message_id(\"scheduled-id\")\n          .build_delete_request())\n\nresponse = ms.schedules.delete_schedule(request)\n```\n\n## Recipients\n\n### Get a list of recipients\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .build_recipients_list_request())\n\nresponse = ms.recipients.list_recipients(request)\n```\n\n### Get a single recipient\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\nrequest = (RecipientsBuilder()\n          .recipient_id(\"recipient-id\")\n          .build_recipient_get_request())\n\nresponse = ms.recipients.get_recipient(request)\n```\n\n### Delete a recipient\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\nrequest = (RecipientsBuilder()\n          .recipient_id(\"recipient-id\")\n          .build_recipient_delete_request())\n\nresponse = ms.recipients.delete_recipient(request)\n```\n\n### Get recipients from a blocklist\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .build_suppression_list_request())\n\nresponse = ms.recipients.list_blocklist(request)\n```\n\n### Get recipients from hard bounces\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .build_suppression_list_request())\n\nresponse = ms.recipients.list_hard_bounces(request)\n```\n\n### Get recipients from spam complaints\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .build_suppression_list_request())\n\nresponse = ms.recipients.list_spam_complaints(request)\n```\n\n### Get recipients from unsubscribes\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .build_suppression_list_request())\n\nresponse = ms.recipients.list_unsubscribes(request)\n```\n\n### Add recipients to blocklist\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\n# Using specific emails\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .recipients([\"blocked@example.com\", \"spam@example.com\"])\n          .build_suppression_add_request())\n\nresponse = ms.recipients.add_to_blocklist(request)\n\n# Using patterns\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .patterns([\"*@spammer.com\", \"*@blocked-domain.com\"])\n          .build_suppression_add_request())\n\nresponse = ms.recipients.add_to_blocklist(request)\n```\n\n### Add hard bounced recipients\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .recipients([\"bounced@example.com\"])\n          .build_suppression_add_request())\n\nresponse = ms.recipients.add_hard_bounces(request)\n```\n\n### Add spam complaints\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .recipients([\"complainer@example.com\"])\n          .build_suppression_add_request())\n\nresponse = ms.recipients.add_spam_complaints(request)\n```\n\n### Add recipients to unsubscribe list\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .recipients([\"unsubscribed@example.com\"])\n          .build_suppression_add_request())\n\nresponse = ms.recipients.add_unsubscribes(request)\n```\n\n### Delete recipients from blocklist\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\n# Delete specific entries by IDs\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .ids([\"recipient-id-1\", \"recipient-id-2\"])\n          .build_suppression_delete_request())\n\nresponse = ms.recipients.delete_from_blocklist(request)\n\n# Or delete all entries\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .all(True)\n          .build_suppression_delete_request())\n\nresponse = ms.recipients.delete_from_blocklist(request)\n```\n\n### Delete hard bounced recipients\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\n# Delete specific entries by IDs\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .ids([\"recipient-id\"])\n          .build_suppression_delete_request())\n\nresponse = ms.recipients.delete_hard_bounces(request)\n\n# Or delete all entries\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .all(True)\n          .build_suppression_delete_request())\n\nresponse = ms.recipients.delete_hard_bounces(request)\n```\n\n### Delete spam complaints\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\n# Delete specific entries by IDs  \nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .ids([\"recipient-id\"])\n          .build_suppression_delete_request())\n\nresponse = ms.recipients.delete_spam_complaints(request)\n\n# Or delete all entries\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .all(True)\n          .build_suppression_delete_request())\n\nresponse = ms.recipients.delete_spam_complaints(request)\n```\n\n### Delete recipients from unsubscribe list\n\n```python\nfrom mailersend import MailerSendClient, RecipientsBuilder\n\nms = MailerSendClient()\n\n# Delete specific entries by IDs\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .ids([\"recipient-id\"])\n          .build_suppression_delete_request())\n\nresponse = ms.recipients.delete_unsubscribes(request)\n\n# Or delete all entries\nrequest = (RecipientsBuilder()\n          .domain_id(\"domain-id\")\n          .all(True)\n          .build_suppression_delete_request())\n\nresponse = ms.recipients.delete_unsubscribes(request)\n```\n\n## Templates\n\n### Get a list of templates\n\n```python\nfrom mailersend import MailerSendClient, TemplatesBuilder\n\nms = MailerSendClient()\n\nrequest = (TemplatesBuilder()\n          .domain_id(\"domain-id\")\n          .page(1)\n          .limit(25)\n          .build_templates_list_request())\n\nresponse = ms.templates.list_templates(request)\n```\n\n### Get a single template\n\n```python\nfrom mailersend import MailerSendClient, TemplatesBuilder\n\nms = MailerSendClient()\n\nrequest = (TemplatesBuilder()\n          .template(\"template-id\")\n          .build_template_get_request())\n\nresponse = ms.templates.get_template(request)\n```\n\n### Delete template\n\n```python\nfrom mailersend import MailerSendClient, TemplatesBuilder\n\nms = MailerSendClient()\n\nrequest = (TemplatesBuilder()\n          .template(\"template-id\")\n          .build_delete_request())\n\nresponse = ms.templates.delete_template(request)\n```\n\n## Webhooks\n\n### Get a list of webhooks\n\n```python\nfrom mailersend import MailerSendClient, WebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (WebhooksBuilder()\n          .domain_id(\"domain-id\")\n          .build_webhooks_list_request())\n\nresponse = ms.webhooks.list_webhooks(request)\n```\n\n### Get a single webhook\n\n```python\nfrom mailersend import MailerSendClient, WebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (WebhooksBuilder()\n          .webhook_id(\"webhook-id\")\n          .build_webhook_get_request())\n\nresponse = ms.webhooks.get_webhook(request)\n```\n\n### Create a Webhook\n\n```python\nfrom mailersend import MailerSendClient, WebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (WebhooksBuilder()\n          .domain_id(\"domain-id\")\n          .url(\"https://yourdomain.com/webhook\")\n          .name(\"My webhook\")\n          .events([\"activity.sent\", \"activity.delivered\"])\n          .enabled(True)\n          .build_webhook_create_request())\n\nresponse = ms.webhooks.create_webhook(request)\n```\n\n### Create a disabled webhook\n\n```python\nfrom mailersend import MailerSendClient, WebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (WebhooksBuilder()\n          .domain_id(\"domain-id\")\n          .url(\"https://yourdomain.com/webhook\")\n          .name(\"My disabled webhook\")\n          .events([\"activity.sent\", \"activity.delivered\"])\n          .enabled(False)\n          .build_webhook_create_request())\n\nresponse = ms.webhooks.create_webhook(request)\n```\n\n### Update a Webhook\n\n```python\nfrom mailersend import MailerSendClient, WebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (WebhooksBuilder()\n          .webhook_id(\"webhook-id\")\n          .url(\"https://yourdomain.com/webhook-updated\")\n          .name(\"My updated webhook\")\n          .events([\"activity.sent\"])\n          .enabled(True)\n          .build_webhook_update_request())\n\nresponse = ms.webhooks.update_webhook(request)\n```\n\n### Disable/Enable a Webhook\n\n```python\nfrom mailersend import MailerSendClient, WebhooksBuilder\n\nms = MailerSendClient()\n\n# Disable webhook\nrequest = (WebhooksBuilder()\n          .webhook_id(\"webhook-id\")\n          .enabled(False)\n          .build_webhook_update_request())\n\nresponse = ms.webhooks.update_webhook(request)\n\n# Enable webhook\nrequest = (WebhooksBuilder()\n          .webhook_id(\"webhook-id\")\n          .enabled(True)\n          .build_webhook_update_request())\n\nresponse = ms.webhooks.update_webhook(request)\n```\n\n### Delete a Webhook\n\n```python\nfrom mailersend import MailerSendClient, WebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (WebhooksBuilder()\n          .webhook_id(\"webhook-id\")\n          .build_webhook_delete_request())\n\nresponse = ms.webhooks.delete_webhook(request)\n```\n\n## Email Verification\n\n### Get all email verification lists\n\n```python\nfrom mailersend import MailerSendClient, EmailVerificationBuilder\n\nms = MailerSendClient()\n\nrequest = EmailVerificationBuilder().build_lists()\n\nresponse = ms.email_verification.list_verifications(request)\n```\n\n### Get a single email verification list\n\n```python\nfrom mailersend import MailerSendClient, EmailVerificationBuilder\n\nms = MailerSendClient()\n\nrequest = (EmailVerificationBuilder()\n          .email_verification_id(\"list-id\")\n          .build_get())\n\nresponse = ms.email_verification.get_verification(request)\n```\n\n### Create an email verification list\n\n```python\nfrom mailersend import MailerSendClient, EmailVerificationBuilder\n\nms = MailerSendClient()\n\nrequest = (EmailVerificationBuilder()\n          .name(\"My Verification List\")\n          .emails([\"test1@example.com\", \"test2@example.com\"])\n          .build_create())\n\nresponse = ms.email_verification.create_verification(request)\n```\n\n### Verify a list\n\n```python\nfrom mailersend import MailerSendClient, EmailVerificationBuilder\n\nms = MailerSendClient()\n\nrequest = (EmailVerificationBuilder()\n          .email_verification_id(\"list-id\")\n          .build_verify_list())\n\nresponse = ms.email_verification.verify_list(request)\n```\n\n### Get list results\n\n```python\nfrom mailersend import MailerSendClient, EmailVerificationBuilder\n\nms = MailerSendClient()\n\nrequest = (EmailVerificationBuilder()\n          .email_verification_id(\"list-id\")\n          .build_results())\n\nresponse = ms.email_verification.get_results(request)\n```\n\n## Webhooks\n\n### Get a list of webhooks\n\n```python\nfrom mailersend import MailerSendClient\nfrom mailersend import WebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (WebhooksBuilder()\n          .domain_id(\"domain-id\")\n          .build_webhooks_list_request())\n\nresponse = ms.webhooks.list_webhooks(request)\n```\n\n### Get a single webhook\n\n```python\nfrom mailersend import MailerSendClient\nfrom mailersend import WebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (WebhooksBuilder()\n          .webhook_id(\"webhook-id\")\n          .build_webhook_get_request())\n\nresponse = ms.webhooks.get_webhook(request)\n```\n\n### Create a Webhook\n\n```python\nfrom mailersend import MailerSendClient\nfrom mailersend import WebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (WebhooksBuilder()\n          .domain_id(\"domain-id\")\n          .url(\"https://webhook.example.com\")\n          .name(\"My Webhook\")\n          .events([\"activity.sent\", \"activity.delivered\", \"activity.opened\"])\n          .enabled(True)\n          .build_webhook_create_request())\n\nresponse = ms.webhooks.create_webhook(request)\n```\n\n### Create a disabled webhook\n\n```python\nfrom mailersend import MailerSendClient\nfrom mailersend import WebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (WebhooksBuilder()\n          .domain_id(\"domain-id\")\n          .url(\"https://webhook.example.com\")\n          .name(\"Disabled Webhook\")\n          .events([\"activity.sent\", \"activity.delivered\"])\n          .enabled(False)  # Create disabled\n          .build_webhook_create_request())\n\nresponse = ms.webhooks.create_webhook(request)\n```\n\n### Update a Webhook\n\n```python\nfrom mailersend import MailerSendClient\nfrom mailersend import WebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (WebhooksBuilder()\n          .webhook_id(\"webhook-id\")\n          .name(\"Updated Webhook Name\")\n          .url(\"https://new-webhook.example.com\")\n          .enabled(True)\n          .build_webhook_update_request())\n\nresponse = ms.webhooks.update_webhook(request)\n```\n\n### Disable/Enable a Webhook\n\n```python\nfrom mailersend import MailerSendClient\nfrom mailersend import WebhooksBuilder\n\nms = MailerSendClient()\n\n# Disable webhook\nrequest = (WebhooksBuilder()\n          .webhook_id(\"webhook-id\")\n          .enabled(False)\n          .build_webhook_update_request())\n\nresponse = ms.webhooks.update_webhook(request)\n\n# Enable webhook\nrequest = (WebhooksBuilder()\n          .webhook_id(\"webhook-id\")\n          .enabled(True)\n          .build_webhook_update_request())\n\nresponse = ms.webhooks.update_webhook(request)\n```\n\n### Delete a Webhook\n\n```python\nfrom mailersend import MailerSendClient\nfrom mailersend import WebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (WebhooksBuilder()\n          .webhook_id(\"webhook-id\")\n          .build_webhook_delete_request())\n\nresponse = ms.webhooks.delete_webhook(request)\n```\n\n## Email Verification\n\n### Get all email verification lists\n\n```python\nfrom mailersend import MailerSendClient, EmailVerificationBuilder\n\nms = MailerSendClient()\n\nrequest = EmailVerificationBuilder().build_list_request()\nresponse = ms.email_verification.list_verification_lists(request)\n```\n\n### Get a single email verification list\n\n```python\nfrom mailersend import MailerSendClient, EmailVerificationBuilder\n\nms = MailerSendClient()\n\nrequest = (EmailVerificationBuilder()\n          .verification_list_id(\"list-id\")\n          .build_get_request())\n\nresponse = ms.email_verification.get_verification_list(request)\n```\n\n### Create an email verification list\n\n```python\nfrom mailersend import MailerSendClient, EmailVerificationBuilder\n\nms = MailerSendClient()\n\nrequest = (EmailVerificationBuilder()\n          .name(\"My Verification List\")\n          .emails([\"test1@example.com\", \"test2@example.com\"])\n          .build_create_request())\n\nresponse = ms.email_verification.create_verification_list(request)\n```\n\n### Verify a list\n\n```python\nfrom mailersend import MailerSendClient, EmailVerificationBuilder\n\nms = MailerSendClient()\n\nrequest = (EmailVerificationBuilder()\n          .verification_list_id(\"list-id\")\n          .build_verify_request())\n\nresponse = ms.email_verification.verify_list(request)\n```\n\n### Get list results\n\n```python\nfrom mailersend import MailerSendClient, EmailVerificationBuilder\n\nms = MailerSendClient()\n\nrequest = (EmailVerificationBuilder()\n          .verification_list_id(\"list-id\")\n          .build_results_request())\n\nresponse = ms.email_verification.get_verification_results(request)\n```\n\n## SMS\n\n### Sending SMS messages\n\n```python\nfrom mailersend import MailerSendClient, SmsSendingBuilder\n\nms = MailerSendClient()\n\n# Simple SMS\nrequest = (SmsSendingBuilder()\n          .from_number(\"sms-number\")\n          .to([\"+1234567890\", \"+1234567891\"])\n          .text(\"Hello from MailerSend SMS!\")\n          .build())\n\nresponse = ms.sms_sending.send(request)\n\n# SMS with personalization\nrequest = (SmsSendingBuilder()\n          .from_number(\"sms-number\")\n          .to([\"+1234567890\", \"+1234567891\"])\n          .text(\"Hello {{name}}, your order {{order_id}} is ready!\")\n          .personalization([\n              {\n                  \"phone_number\": \"+1234567890\",\n                  \"data\": {\"name\": \"John\", \"order_id\": \"12345\"}\n              },\n              {\n                  \"phone_number\": \"+1234567891\", \n                  \"data\": {\"name\": \"Jane\", \"order_id\": \"12346\"}\n              }\n          ])\n          .build())\n\nresponse = ms.sms_sending.send(request)\n```\n\n## SMS Activity\n\n### Get a list of SMS activities\n\n```python\nfrom mailersend import MailerSendClient, SmsActivityBuilder\nfrom datetime import datetime, timedelta\n\nms = MailerSendClient()\n\n# Get activities from last 7 days\ndate_from = int((datetime.now() - timedelta(days=7)).timestamp())\ndate_to = int(datetime.now().timestamp())\n\nrequest = (SmsActivityBuilder()\n          .sms_number_id(\"sms-number-id\")\n          .date_from(date_from)\n          .date_to(date_to)\n          .status([\"sent\", \"delivered\", \"failed\"])\n          .page(1)\n          .limit(25)\n          .build_list_request())\n\nresponse = ms.sms_activity.list(request)\n```\n\n### Get activity of a single SMS message\n\n```python\nfrom mailersend import MailerSendClient, SmsActivityBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsActivityBuilder()\n          .sms_message_id(\"sms-message-id\")\n          .build_get_request())\n\nresponse = ms.sms_activity.get(request)\n```\n\n## SMS Phone Numbers\n\n### Get a list of SMS phone numbers\n\n```python\nfrom mailersend import MailerSendClient, SmsNumbersBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsNumbersBuilder()\n          .paused(False)\n          .page(1)\n          .limit(25)\n          .build_list_request())\n\nresponse = ms.sms_numbers.list(request)\n```\n\n### Get an SMS phone number\n\n```python\nfrom mailersend import MailerSendClient, SmsNumbersBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsNumbersBuilder()\n          .sms_number_id(\"sms-number-id\")\n          .build_get_request())\n\nresponse = ms.sms_numbers.get(request)\n```\n\n### Update a single SMS phone number\n\n```python\nfrom mailersend import MailerSendClient, SmsNumbersBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsNumbersBuilder()\n          .sms_number_id(\"sms-number-id\")\n          .paused(True)\n          .build_update_request())\n\nresponse = ms.sms_numbers.update(request)\n```\n\n### Delete an SMS phone number\n\n```python\nfrom mailersend import MailerSendClient, SmsNumbersBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsNumbersBuilder()\n          .sms_number_id(\"sms-number-id\")\n          .build_delete_request())\n\nresponse = ms.sms_numbers.delete(request)\n```\n\n## SMS Recipients\n\n### Get a list of SMS recipients\n\n```python\nfrom mailersend import MailerSendClient, SmsRecipientsBuilder\nfrom mailersend.models.sms_recipients import SmsRecipientStatus\n\nms = MailerSendClient()\n\nrequest = (SmsRecipientsBuilder()\n          .sms_number_id(\"sms-number-id\")\n          .status(SmsRecipientStatus.ACTIVE)\n          .page(1)\n          .limit(25)\n          .build_list_request())\n\nresponse = ms.sms_recipients.list_sms_recipients(request)\n```\n\n### Get an SMS recipient\n\n```python\nfrom mailersend import MailerSendClient, SmsRecipientsBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsRecipientsBuilder()\n          .sms_recipient_id(\"recipient-id\")\n          .build_get_request())\n\nresponse = ms.sms_recipients.get_sms_recipient(request)\n```\n\n### Update a single SMS recipient\n\n```python\nfrom mailersend import MailerSendClient, SmsRecipientsBuilder\nfrom mailersend.models.sms_recipients import SmsRecipientStatus\n\nms = MailerSendClient()\n\nrequest = (SmsRecipientsBuilder()\n          .sms_recipient_id(\"recipient-id\")\n          .build_update_request(SmsRecipientStatus.OPT_OUT))\n\nresponse = ms.sms_recipients.update_sms_recipient(request)\n```\n\n## SMS Messages\n\n### Get a list of SMS messages\n\n```python\nfrom mailersend import MailerSendClient, SmsMessagesBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsMessagesBuilder()\n          .page(1)\n          .limit(25)\n          .build_sms_messages_list())\n\nresponse = ms.sms_messages.list_sms_messages(request)\n```\n\n### Get an SMS message\n\n```python\nfrom mailersend import MailerSendClient, SmsMessagesBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsMessagesBuilder()\n          .sms_message_id(\"message-id\")\n          .build_sms_message_get())\n\nresponse = ms.sms_messages.get_sms_message(request)\n```\n\n## SMS Webhooks\n\n### Get a list of SMS webhooks\n\n```python\nfrom mailersend import MailerSendClient, SmsWebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsWebhooksBuilder()\n          .sms_number_id(\"sms-number-id\")\n          .build_list_request())\n\nresponse = ms.sms_webhooks.list_sms_webhooks(request)\n```\n\n### Get a single SMS webhook\n\n```python\nfrom mailersend import MailerSendClient, SmsWebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsWebhooksBuilder()\n          .sms_webhook_id(\"webhook-id\")\n          .build_get_request())\n\nresponse = ms.sms_webhooks.get_sms_webhook(request)\n```\n\n### Create an SMS webhook\n\n```python\nfrom mailersend import MailerSendClient, SmsWebhooksBuilder\nfrom mailersend.models.sms_webhooks import SmsWebhookEvent\n\nms = MailerSendClient()\n\nrequest = (SmsWebhooksBuilder()\n          .from_number(\"sms-number-id\")\n          .url(\"https://webhook.example.com/sms\")\n          .name(\"SMS Webhook\")\n          .add_event(SmsWebhookEvent.SMS_SENT)\n          .add_event(SmsWebhookEvent.SMS_DELIVERED)\n          .add_event(SmsWebhookEvent.SMS_FAILED)\n          .enabled(True)\n          .build_create_request())\n\nresponse = ms.sms_webhooks.create_sms_webhook(request)\n```\n\n### Update a single SMS webhook\n\n```python\nfrom mailersend import MailerSendClient, SmsWebhooksBuilder\nfrom mailersend.models.sms_webhooks import SmsWebhookEvent\n\nms = MailerSendClient()\n\nrequest = (SmsWebhooksBuilder()\n          .sms_webhook_id(\"webhook-id\")\n          .name(\"Updated SMS Webhook\")\n          .url(\"https://new-webhook.example.com/sms\")\n          .events([SmsWebhookEvent.SMS_DELIVERED, SmsWebhookEvent.SMS_FAILED])\n          .enabled(False)\n          .build_update_request())\n\nresponse = ms.sms_webhooks.update_sms_webhook(request)\n```\n\n### Delete an SMS webhook\n\n```python\nfrom mailersend import MailerSendClient, SmsWebhooksBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsWebhooksBuilder()\n          .sms_webhook_id(\"webhook-id\")\n          .build_delete_request())\n\nresponse = ms.sms_webhooks.delete_sms_webhook(request)\n```\n\n## SMS Inbound Routing\n\n### Get a list of SMS inbound routes\n\n```python\nfrom mailersend import MailerSendClient, SmsInboundsBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsInboundsBuilder()\n          .sms_number_id(\"sms-number-id\")\n          .enabled(True)\n          .build_list_request())\n\nresponse = ms.sms_inbounds.list_sms_inbounds(request)\n```\n\n### Get a single SMS inbound route\n\n```python\nfrom mailersend import MailerSendClient, SmsInboundsBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsInboundsBuilder()\n          .sms_inbound_id(\"inbound-id\")\n          .build_get_request())\n\nresponse = ms.sms_inbounds.get_sms_inbound(request)\n```\n\n### Create an SMS inbound route\n\n```python\nfrom mailersend import MailerSendClient, SmsInboundsBuilder\nfrom mailersend.models.sms_inbounds import FilterComparer\n\nms = MailerSendClient()\n\nrequest = (SmsInboundsBuilder()\n          .sms_number_id(\"sms-number-id\")\n          .name(\"Support Route\")\n          .forward_url(\"https://api.example.com/sms/support\")\n          .filter(FilterComparer.STARTS_WITH, \"SUPPORT\")\n          .enabled(True)\n          .build_create_request())\n\nresponse = ms.sms_inbounds.create_sms_inbound(request)\n```\n\n### Update an SMS inbound route\n\n```python\nfrom mailersend import MailerSendClient, SmsInboundsBuilder\nfrom mailersend.models.sms_inbounds import FilterComparer\n\nms = MailerSendClient()\n\nrequest = (SmsInboundsBuilder()\n          .sms_number_id(\"inbound-id\")\n          .name(\"Updated Support Route\")\n          .forward_url(\"https://api.example.com/sms/new-support\")\n          .filter(FilterComparer.CONTAINS, \"HELP\")\n          .enabled(False)\n          .build_update_request())\n\nresponse = ms.sms_inbounds.update_sms_inbound(request)\n```\n\n### Delete an SMS inbound route\n\n```python\nfrom mailersend import MailerSendClient, SmsInboundsBuilder\n\nms = MailerSendClient()\n\nrequest = (SmsInboundsBuilder()\n          .sms_inbound_id(\"inbound-id\")\n          .build_delete_request())\n\nresponse = ms.sms_inbounds.delete_sms_inbound(request)\n```\n\n## Tokens\n\n### Create a token\n\n```python\nfrom mailersend import MailerSendClient, TokensBuilder\n\nms = MailerSendClient()\n\nrequest = (TokensBuilder()\n          .name(\"My API Token\")\n          .scopes([\"email_full\", \"analytics_read\"])\n          .domain_id(\"domain-id\")\n          .build_token_create())\n\nresponse = ms.tokens.create_token(request)\n```\n\n### Pause / Unpause Token\n\n```python\nfrom mailersend import MailerSendClient, TokensBuilder\n\nms = MailerSendClient()\n\n# Pause token\nrequest = (TokensBuilder()\n          .token_id(\"token-id\")\n          .status(\"pause\")\n          .build_token_update())\n\nresponse = ms.tokens.update_token(request)\n\n# Unpause token\nrequest = (TokensBuilder()\n          .token_id(\"token-id\")\n          .status(\"unpause\")\n          .build_token_update())\n\nresponse = ms.tokens.update_token(request)\n```\n\n### Delete a Token\n\n```python\nfrom mailersend import MailerSendClient, TokensBuilder\n\nms = MailerSendClient()\n\nrequest = (TokensBuilder()\n          .token_id(\"token-id\")\n          .build_token_delete())\n\nresponse = ms.tokens.delete_token(request)\n```\n\n## SMTP Users\n\n### Get a list of SMTP users\n\n```python\nfrom mailersend import MailerSendClient, SmtpUsersBuilder\n\nms = MailerSendClient()\n\nrequest = (SmtpUsersBuilder()\n          .domain_id(\"domain-id\")\n          .build_smtp_users_list())\n\nresponse = ms.smtp_users.list_smtp_users(request)\n```\n\n### Get a single SMTP user\n\n```python\nfrom mailersend import MailerSendClient, SmtpUsersBuilder\n\nms = MailerSendClient()\n\nrequest = (SmtpUsersBuilder()\n          .domain_id(\"domain-id\")\n          .smtp_user_id(\"smtp-user-id\")\n          .build_smtp_user_get())\n\nresponse = ms.smtp_users.get_smtp_user(request)\n```\n\n### Create an SMTP user\n\n```python\nfrom mailersend import MailerSendClient, SmtpUsersBuilder\n\nms = MailerSendClient()\n\nrequest = (SmtpUsersBuilder()\n          .domain_id(\"domain-id\")\n          .name(\"SMTP User Name\")\n          .enabled(True)\n          .build_smtp_user_create())\n\nresponse = ms.smtp_users.create_smtp_user(request)\n```\n\n### Update an SMTP user\n\n```python\nfrom mailersend import MailerSendClient, SmtpUsersBuilder\n\nms = MailerSendClient()\n\nrequest = (SmtpUsersBuilder()\n          .domain_id(\"domain-id\")\n          .smtp_user_id(\"smtp-user-id\")\n          .name(\"Updated SMTP User Name\")\n          .enabled(False)\n          .build_smtp_user_update())\n\nresponse = ms.smtp_users.update_smtp_user(request)\n```\n\n### Delete an SMTP user\n\n```python\nfrom mailersend import MailerSendClient, SmtpUsersBuilder\n\nms = MailerSendClient()\n\nrequest = (SmtpUsersBuilder()\n          .domain_id(\"domain-id\")\n          .smtp_user_id(\"smtp-user-id\")\n          .build_smtp_user_delete())\n\nresponse = ms.smtp_users.delete_smtp_user(request)\n```\n\n## Users\n\n### Get a list of account users\n\n```python\nfrom mailersend import MailerSendClient, UsersBuilder\n\nms = MailerSendClient()\n\nrequest = (UsersBuilder()\n          .page(1)\n          .limit(25)\n          .build_users_list())\n\nresponse = ms.users.list_users(request)\n```\n\n### Get a single account user\n\n```python\nfrom mailersend import MailerSendClient, UsersBuilder\n\nms = MailerSendClient()\n\nrequest = (UsersBuilder()\n          .user_id(\"user-id\")\n          .build_user_get())\n\nresponse = ms.users.get_user(request)\n```\n\n### Invite a user to account\n\n```python\nfrom mailersend import MailerSendClient, UsersBuilder\n\nms = MailerSendClient()\n\n# Basic invite with admin role\nrequest = (UsersBuilder()\n          .email(\"newuser@example.com\")\n          .admin_role()\n          .build_user_invite())\n\nresponse = ms.users.invite_user(request)\n\n# Custom invite with specific permissions and access\nrequest = (UsersBuilder()\n          .email(\"designer@example.com\")\n          .designer_role()\n          .add_permission(\"read-all-templates\")\n          .add_permission(\"manage-template\")\n          .add_template(\"template-id\")\n          .add_domain(\"domain-id\")\n          .requires_periodic_password_change(True)\n          .build_user_invite())\n\nresponse = ms.users.invite_user(request)\n```\n\n### Update an account user\n\n```python\nfrom mailersend import MailerSendClient, UsersBuilder\n\nms = MailerSendClient()\n\nrequest = (UsersBuilder()\n          .user_id(\"user-id\")\n          .manager_role()\n          .add_permission(\"read-analytics\")\n          .add_permission(\"read-activity\")\n          .add_domain(\"domain-id\")\n          .build_user_update())\n\nresponse = ms.users.update_user(request)\n```\n\n### Delete a user from account\n\n```python\nfrom mailersend import MailerSendClient, UsersBuilder\n\nms = MailerSendClient()\n\nrequest = (UsersBuilder()\n          .user_id(\"user-id\")\n          .build_user_delete())\n\nresponse = ms.users.delete_user(request)\n```\n\n### Get a list of invites\n\n```python\nfrom mailersend import MailerSendClient, UsersBuilder\n\nms = MailerSendClient()\n\nrequest = (UsersBuilder()\n          .page(1)\n          .limit(25)\n          .build_invites_list())\n\nresponse = ms.users.list_invites(request)\n```\n\n### Get a single invite\n\n```python\nfrom mailersend import MailerSendClient, UsersBuilder\n\nms = MailerSendClient()\n\nrequest = (UsersBuilder()\n          .invite_id(\"invite-id\")\n          .build_invite_get())\n\nresponse = ms.users.get_invite(request)\n```\n\n### Resend an invite\n\n```python\nfrom mailersend import MailerSendClient, UsersBuilder\n\nms = MailerSendClient()\n\nrequest = (UsersBuilder()\n          .invite_id(\"invite-id\")\n          .build_invite_resend())\n\nresponse = ms.users.resend_invite(request)\n```\n\n### Cancel an invite\n\n```python\nfrom mailersend import MailerSendClient, UsersBuilder\n\nms = MailerSendClient()\n\nrequest = (UsersBuilder()\n          .invite_id(\"invite-id\")\n          .build_invite_cancel())\n\nresponse = ms.users.cancel_invite(request)\n```\n\n## Other Endpoints\n\n### Get API Quota\n\n```python\nfrom mailersend import MailerSendClient\n\nms = MailerSendClient()\n\nresponse = ms.api_quota.get_quota()\n```\n\n\u003ca name=\"error-handling\"\u003e\u003c/a\u003e\n\n# Error Handling\n\nThe SDK provides comprehensive error handling with detailed error information:\n\n```python\nfrom mailersend import MailerSendClient\nfrom mailersend.exceptions import MailerSendError\nfrom mailersend import EmailBuilder\n\nms = MailerSendClient()\n\ntry:\n    email = (EmailBuilder()\n             .from_email(\"invalid-email\", \"Sender\")  # Invalid email\n             .to_many([{\"email\": \"recipient@domain.com\", \"name\": \"Recipient\"}])\n             .subject(\"Test\")\n             .html(\"\u003ch1\u003eTest\u003c/h1\u003e\")\n             .build())\n    \n    response = ms.emails.send(email)\n    \nexcept MailerSendError as e:\n    print(f\"MailerSend API Error: {e}\")\n    print(f\"Status Code: {e.status_code}\")\n    print(f\"Error Details: {e.details}\")\n    \nexcept Exception as e:\n    print(f\"Unexpected error: {e}\")\n```\n\nCommon error types:\n\n- **ValidationError**: Invalid data in request models (handled by Pydantic)\n- **AuthenticationError**: Invalid or missing API key\n- **RateLimitError**: API rate limit exceeded\n- **APIError**: General API errors (4xx, 5xx responses)\n- **NetworkError**: Network connectivity issues\n\n# Testing\n\n## Running Unit Tests\n\n```bash\n# Install development dependencies\npip install -e \".[dev]\"\n\n# Run all tests\npytest\n\n# Run specific test module\npytest tests/unit/test_sms_recipients_*.py\n\n# Run with coverage\npytest --cov=mailersend --cov-report=html\n```\n\n## Testing with VCR\n\nThe SDK uses VCR.py for integration tests to record and replay API responses:\n\n```python\nimport pytest\nfrom mailersend import MailerSendClient\nfrom mailersend import SmsRecipientsBuilder\n\n@pytest.mark.vcr\ndef test_list_sms_recipients():\n    ms = MailerSendClient()\n    request = SmsRecipientsBuilder().build_list_request()\n    response = ms.sms_recipients.list_sms_recipients(request)\n    assert response.data is not None\n```\n\n\u003ca name=\"endpoints\"\u003e\u003c/a\u003e\n\n# Available endpoints\n\n| Feature group         | Endpoint                                | Available |\n|-----------------------|-----------------------------------------|-----------|\n| Activity              | `GET activity`                          | ✅         |\n| Analytics             | `GET analytics`                         | ✅         |\n| Domains               | `{GET, POST, PUT, DELETE} domains`      | ✅         |\n| Email                 | `POST send`                             | ✅         |\n| Email Verification    | `{GET, POST, PUT} email-verification`   | ✅         |\n| Bulk Email           | `POST bulk-email`                       | ✅         |\n| Inbound Routes       | `{GET, POST, PUT, DELETE} inbound`      | ✅         |\n| Messages             | `GET messages`                          | ✅         |\n| Scheduled Messages   | `{GET, DELETE} scheduled-messages`      | ✅         |\n| Recipients           | `{GET, POST, DELETE} recipients`        | ✅         |\n| Templates            | `{GET, DELETE} templates`               | ✅         |\n| Tokens               | `{POST, PUT, DELETE} tokens`            | ✅         |\n| SMTP Users           | `{GET, POST, PUT, DELETE} smtp-users`   | ✅         |\n| Users                | `{GET, POST, PUT, DELETE} users`        | ✅         |\n| User Invites         | `{GET, POST, DELETE} invites`           | ✅         |\n| Webhooks             | `{GET, POST, PUT, DELETE} webhooks`     | ✅         |\n| SMS Sending          | `POST sms`                              | ✅         |\n| SMS Activity         | `GET sms-activity`                      | ✅         |\n| SMS Phone Numbers    | `{GET, PUT, DELETE} sms-numbers`        | ✅         |\n| SMS Recipients       | `{GET, PUT} sms-recipients`             | ✅         |\n| SMS Messages         | `GET sms-messages`                      | ✅         |\n| SMS Webhooks         | `{GET, POST, PUT, DELETE} sms-webhooks` | ✅         |\n| SMS Inbound Routing  | `{GET, POST, PUT, DELETE} sms-inbounds` | ✅         |\n| Sender Identities    | `{GET, POST, PUT, DELETE} identities`   | ✅         |\n| API Quota            | `GET api-quota`                         | ✅         |\n\n*All endpoints are available and fully tested. Refer to [official API docs](https://developers.mailersend.com/) for the most up-to-date API specifications.*\n\n\u003ca name=\"support-and-feedback\"\u003e\u003c/a\u003e\n\n# Support and Feedback\n\nIn case you find any bugs, submit an issue directly here in GitHub.\n\nIf you have any troubles using our API or SDK free to contact our support by email [info@mailersend.com](mailto:info@mailersend.com)\n\nThe official documentation is at [https://developers.mailersend.com](https://developers.mailersend.com)\n\n\u003ca name=\"license\"\u003e\u003c/a\u003e\n\n# License\n\n[The MIT License (MIT)](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailersend%2Fmailersend-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmailersend%2Fmailersend-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailersend%2Fmailersend-python/lists"}