MailOdds Python SDK
The official Python client for email validation, transactional sending, and deliverability monitoring through the MailOdds API.
Installation
pip install mailodds
Requires Python 3.9+.
Quick Start
import os
import mailodds
configuration = mailodds.Configuration(
host="https://api.mailodds.com/v1",
access_token=os.environ["MAILODDS_API_KEY"],
)
with mailodds.ApiClient(configuration) as client:
api = mailodds.EmailValidationApi(client)
request = mailodds.ValidateRequest(email="user@example.com")
result = api.validate_email(request)
print(f"Status: {result.result.status}, Action: {result.result.action}")
Error Handling
from mailodds.rest import ApiException
try:
result = api.validate_email(request)
except ApiException as e:
print(f"API error {e.status}: {e.body}")
ApiException includes status, body, headers, and reason for debugging.
MailOdds Platform
This SDK is part of the MailOdds email deliverability platform. Explore all capabilities.
- Email Validation API - Single and batch email verification with 25+ real-time checks
- Bulk Email Validation - Process lists of up to 500,000 emails per job
- Email Sending API - Transactional email delivery with DKIM dual signing
- Email Deliverability Platform - Full-stack deliverability monitoring and optimization
- DMARC Monitoring - Aggregate report analysis with policy recommendations
- Sender Reputation - Real-time sender health scoring and trend analysis
- SMTP Server Test - DNS, MX, and SMTP connectivity diagnostics
- API Reference - Full endpoint documentation with request and response examples
- Guide: Email Authentication - SPF, DKIM, and DMARC setup guide
- Security - Infrastructure security and data protection practices
Features
- Context manager support - Use the ApiClient as a context manager for automatic resource cleanup
- Typed models - Every API request and response is a Python class with type hints for IDE autocompletion
- Flexible auth - Pass API keys via configuration or environment variables
- Bulk validation - Submit lists of up to 500,000 emails via JSON, file upload, or S3 presigned URL
- Structured error handling - ApiException carries HTTP status codes, response bodies, and headers for precise error recovery
- Full platform coverage - Access validation, sending, suppression lists, validation policies, and subscriber management from one package
Why MailOdds
MailOdds is a complete email deliverability platform built for developers. Every email validated or sent through MailOdds passes through 25+ real-time checks including syntax verification, DNS and MX validation, SMTP mailbox probing, disposable domain detection, and role account identification.
The platform maintains sub-200ms median response times for single validations, 99.9% API uptime, and processes bulk lists of up to 500,000 emails per job. MailOdds supports 11 language SDKs, an MCP server for AI agent integration, a CLI for local development, and a WordPress plugin for no-code deployments.
All email sending uses DKIM dual signing with automated key rotation, and the deliverability monitoring stack covers DMARC aggregate reports, blacklist surveillance across 80+ DNSBLs, and real-time sender health scoring.
API Reference
Full documentation is available at the MailOdds API Reference.
All URIs are relative to https://api.mailodds.com/v1.
All Endpoints
| Class | Method | HTTP request | Description |
|---|---|---|---|
| BulkValidationApi | cancel_job | POST /v1/jobs/{job_id}/cancel | Cancel a job |
| BulkValidationApi | create_job | POST /v1/jobs | Create bulk validation job (JSON) |
| BulkValidationApi | create_job_from_s3 | POST /v1/jobs/upload/s3 | Create job from S3 upload |
| BulkValidationApi | create_job_upload | POST /v1/jobs/upload | Create bulk validation job (file upload) |
| BulkValidationApi | delete_job | DELETE /v1/jobs/{job_id} | Delete a job |
| BulkValidationApi | get_job | GET /v1/jobs/{job_id} | Get job status |
| BulkValidationApi | get_job_results | GET /v1/jobs/{job_id}/results | Get job results |
| BulkValidationApi | get_presigned_upload | POST /v1/jobs/upload/presigned | Get S3 presigned upload URL |
| BulkValidationApi | list_jobs | GET /v1/jobs | List validation jobs |
| EmailSendingApi | deliver_batch | POST /v1/deliver/batch | Send to multiple recipients (max 100) |
| EmailSendingApi | deliver_email | POST /v1/deliver | Send a single email |
| EmailValidationApi | validate_batch | POST /v1/validate/batch | Validate multiple emails (sync) |
| EmailValidationApi | validate_email | POST /v1/validate | Validate single email |
| SendingDomainsApi | create_sending_domain | POST /v1/sending-domains | Add a sending domain |
| SendingDomainsApi | delete_sending_domain | DELETE /v1/sending-domains/{domain_id} | Delete a sending domain |
| SendingDomainsApi | get_sending_domain | GET /v1/sending-domains/{domain_id} | Get a sending domain |
| SendingDomainsApi | get_sending_domain_identity_score | GET /v1/sending-domains/{domain_id}/identity-score | Get domain identity score |
| SendingDomainsApi | get_sending_stats | GET /v1/sending-stats | Get sending statistics |
| SendingDomainsApi | list_sending_domains | GET /v1/sending-domains | List sending domains |
| SendingDomainsApi | verify_sending_domain | POST /v1/sending-domains/{domain_id}/verify | Verify domain DNS records |
| SubscriberListsApi | confirm_subscription | GET /v1/confirm/{token} | Confirm subscription |
| SubscriberListsApi | create_list | POST /v1/lists | Create a subscriber list |
| SubscriberListsApi | delete_list | DELETE /v1/lists/{list_id} | Delete a subscriber list |
| SubscriberListsApi | get_list | GET /v1/lists/{list_id} | Get a subscriber list |
| SubscriberListsApi | get_lists | GET /v1/lists | List subscriber lists |
| SubscriberListsApi | get_subscribers | GET /v1/lists/{list_id}/subscribers | List subscribers |
| SubscriberListsApi | subscribe | POST /v1/subscribe/{list_id} | Subscribe to a list |
| SubscriberListsApi | unsubscribe_subscriber | DELETE /v1/lists/{list_id}/subscribers/{subscriber_id} | Unsubscribe a subscriber |
| SuppressionListsApi | add_suppression | POST /v1/suppression | Add suppression entries |
| SuppressionListsApi | check_suppression | POST /v1/suppression/check | Check suppression status |
| SuppressionListsApi | get_suppression_audit_log | GET /v1/suppression/audit | Get suppression audit log |
| SuppressionListsApi | get_suppression_stats | GET /v1/suppression/stats | Get suppression statistics |
| SuppressionListsApi | list_suppression | GET /v1/suppression | List suppression entries |
| SuppressionListsApi | remove_suppression | DELETE /v1/suppression | Remove suppression entries |
| SystemApi | get_telemetry_summary | GET /v1/telemetry/summary | Get validation telemetry |
| SystemApi | health_check | GET /health | Health check |
| ValidationPoliciesApi | add_policy_rule | POST /v1/policies/{policy_id}/rules | Add rule to policy |
| ValidationPoliciesApi | create_policy | POST /v1/policies | Create policy |
| ValidationPoliciesApi | create_policy_from_preset | POST /v1/policies/from-preset | Create policy from preset |
| ValidationPoliciesApi | delete_policy | DELETE /v1/policies/{policy_id} | Delete policy |
| ValidationPoliciesApi | delete_policy_rule | DELETE /v1/policies/{policy_id}/rules/{rule_id} | Delete rule |
| ValidationPoliciesApi | get_policy | GET /v1/policies/{policy_id} | Get policy |
| ValidationPoliciesApi | get_policy_presets | GET /v1/policies/presets | Get policy presets |
| ValidationPoliciesApi | list_policies | GET /v1/policies | List policies |
| ValidationPoliciesApi | test_policy | POST /v1/policies/test | Test policy evaluation |
| ValidationPoliciesApi | update_policy | PUT /v1/policies/{policy_id} | Update policy |
All Models
- AddPolicyRule201Response
- AddSuppressionRequest
- AddSuppressionRequestEntriesInner
- AddSuppressionResponse
- BatchDeliverRequest
- BatchDeliverRequestStructuredData
- BatchDeliverResponse
- BatchDeliverResponseDelivery
- BatchDeliverResponseRejectedInner
- CheckSuppressionRequest
- ConfirmSubscription200Response
- CreateJobFromS3Request
- CreateJobRequest
- CreateList201Response
- CreateListRequest
- CreatePolicyFromPresetRequest
- CreatePolicyRequest
- CreateSendingDomain201Response
- CreateSendingDomainRequest
- DeleteJob200Response
- DeletePolicy200Response
- DeletePolicyRule200Response
- DeliverRequest
- DeliverRequestOptions
- DeliverRequestStructuredData
- DeliverRequestToInner
- DeliverResponse
- DeliverResponseDelivery
- ErrorResponse
- GetLists200Response
- GetPresignedUploadRequest
- GetSendingDomainIdentityScore200Response
- GetSendingStats200Response
- GetSendingStats200ResponseStats
- GetSubscribers200Response
- HealthCheck200Response
- IdentityScoreCheck
- Job
- JobArtifacts
- JobListResponse
- JobResponse
- JobSummary
- ListSendingDomains200Response
- Pagination
- Policy
- PolicyListResponse
- PolicyListResponseLimits
- PolicyPresetsResponse
- PolicyPresetsResponsePresetsInner
- PolicyResponse
- PolicyRule
- PolicyRuleAction
- PolicyTestResponse
- PresignedUploadResponse
- PresignedUploadResponseUpload
- RemoveSuppression200Response
- RemoveSuppressionRequest
- ResultsResponse
- SendingDomain
- SendingDomainDnsRecords
- SendingDomainDnsRecordsNs
- SendingDomainIdentityScore
- SendingDomainIdentityScoreBreakdown
- SubscribeRequest
- Subscriber
- SubscriberList
- SuppressionAuditResponse
- SuppressionAuditResponseEntriesInner
- SuppressionCheckResponse
- SuppressionEntry
- SuppressionListResponse
- SuppressionStatsResponse
- SuppressionStatsResponseByType
- TelemetrySummary
- TelemetrySummaryRates
- TelemetrySummaryTopDomainsInner
- TelemetrySummaryTopReasonsInner
- TelemetrySummaryTotals
- TestPolicyRequest
- TestPolicyRequestTestResult
- UnsubscribeSubscriber200Response
- UpdatePolicyRequest
- ValidateBatch200Response
- ValidateBatch200ResponseSummary
- ValidateBatchRequest
- ValidateRequest
- ValidationResponse
- ValidationResponsePolicyApplied
- ValidationResponseSuppressionMatch
- ValidationResult
- ValidationResultSuppression
- WebhookEvent
Other SDKs
| Language | Package | Source |
|---|---|---|
| Python | PyPI | GitHub |
| TypeScript | npm | GitHub |
| PHP | Packagist | GitHub |
| Java | GitHub | GitHub |
| Go | pkg.go.dev | GitHub |
| C# / .NET | GitHub | GitHub |
| Ruby | RubyGems | GitHub |
| Kotlin | GitHub | GitHub |
| Rust | crates.io | GitHub |
| Swift | GitHub | GitHub |
| Dart / Flutter | pub.dev | GitHub |
Resources
License
MIT
Metadata
Release files for mailodds 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mailodds-2.1.0.tar.gz | 287.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mailodds-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.2 MB
Release files / mailodds-2.1.0.tar.gz
| Download URL | mailodds-2.1.0.tar.gz |
|---|---|
| Size | 287.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f627e96e07ea059f95a6b05fa6a0ce81afb3a3bf47782365e5397d2be9689b1b
|
|
BLAKE2b-256 checksum How to use checksums |
84fff6abf5d521afddf099db385356d7e5ce1079440b633ecc387bf0e65963ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / mailodds-2.1.0-py3-none-any.whl
| Download URL | mailodds-2.1.0-py3-none-any.whl |
|---|---|
| Size | 905.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b97bac8aac6ecca9a71c8b042d56a794bd73ba3aac3dfe762a3de3838ac387f2
|
|
BLAKE2b-256 checksum How to use checksums |
a3a60d673373a9dbc603bfa12e44a7bf0cbca37814796c31aea644586a5e7991
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for mailodds 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.