mailtrap
v1.0.2Send emails and manage sending domains, suppression lists, and delivery analytics
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_sending_domains List Sending Domains
Retrieve all sending domains configured for an account along with their current verification status. Use this to view domain authentication and readiness for email sending.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for the account. Must be a positive integer. |
create_sending_domain Create Sending Domain
Create a sending domain for email authentication. After creation, you'll need to add DNS records (SPF, DKIM, DMARC) and verify them before sending emails through this domain.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for your account. This is a positive integer that specifies which account owns the sending domain. |
domain_name * | string | The domain name you want to use for sending emails (e.g., example.com). Must be a valid hostname format. |
get_sending_domain Get Sending Domain
Retrieve detailed information and verification status for a specific sending domain associated with your account.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for your account. |
sending_domain_id * | integer | The unique identifier for the sending domain whose details and verification status you want to retrieve. |
delete_sending_domain Delete Sending Domain
Permanently remove a sending domain from your account. This action cannot be undone and will prevent further email transmission through this domain.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for your account. This is a positive integer that specifies which account owns the sending domain being deleted. |
sending_domain_id * | integer | The unique identifier for the sending domain to be deleted. This is a positive integer that identifies the specific domain configuration to remove from your account. |
send_sending_domain_setup_instructions Send Sending Domain Setup Instructions
Send DNS configuration setup instructions to a specified email address for a sending domain. This allows domain administrators to receive the necessary steps to configure DNS records for email authentication.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for the account that owns the sending domain. |
email * | string | The email address where the DNS setup instructions will be sent. Must be a valid email format. |
sending_domain_id * | integer | The unique identifier for the sending domain to configure. |
list_suppressions List Suppressions
Retrieve a list of suppressed email addresses for your account. Suppressed addresses will not receive any emails. Results are limited to 1000 suppressions per request and can be filtered by email address or suppression date.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for your account. |
email | string | Filter results to a specific email address. Must be a valid email format. |
start_time | string | Filter results to show only emails suppressed after this timestamp. Use ISO 8601 date-time format (e.g., 2025-01-01T00:00:00Z). |
delete_suppression Delete Suppression
Remove an email address from the suppression list, allowing it to receive messages again. This operation permanently deletes the suppression record for the specified account.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for the account containing the suppression record. Must be a positive integer. |
suppression_id * | integer | The unique identifier for the suppression record to delete. Must be a positive integer. |
get_account_sending_stats Get Account Sending Stats
Retrieve sending statistics for an account over a specified date range, with optional filtering by sending domains, streams, categories, and email service providers.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for the account whose sending statistics should be retrieved. |
end_date * | string | The end of the date range for which to retrieve statistics, specified in ISO 8601 date format (YYYY-MM-DD). |
start_date * | string | The beginning of the date range for which to retrieve statistics, specified in ISO 8601 date format (YYYY-MM-DD). |
categories | array | Optional list of email categories to filter results (e.g., Welcome Email, Password Reset). When provided, only statistics for the specified categories are included; omit to retrieve results for all ca… |
email_service_providers | array | Optional list of email service providers to filter results (e.g., Google, Yahoo). When provided, only statistics for the specified ESPs are included; omit to retrieve results for all email service pro… |
sending_domain_ids | array | Optional list of sending domain IDs to filter results. When provided, only statistics for the specified domains are included; omit to retrieve results for all sending domains. |
sending_streams | array | Optional list of sending stream types to filter results (e.g., transactional, bulk). When provided, only statistics for the specified streams are included; omit to retrieve results for all sending str… |
get_account_sending_stats_by_domains Get Account Sending Stats by Domains
Retrieve sending statistics for an account aggregated by sending domains over a specified date range. Use optional filters to narrow results by specific domains, sending streams, message categories, or email service providers.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for the account whose sending statistics should be retrieved. |
end_date * | string | The end of the date range (inclusive) for which to retrieve statistics, specified in ISO 8601 date format (YYYY-MM-DD). |
start_date * | string | The beginning of the date range (inclusive) for which to retrieve statistics, specified in ISO 8601 date format (YYYY-MM-DD). |
categories | array | Optional list of message categories to filter results (e.g., Welcome Email, Password Reset). When provided, only statistics for the specified categories are included; omit to include all categories. |
email_service_providers | array | Optional list of email service provider names to filter results (e.g., Google, Yahoo). When provided, only statistics for the specified providers are included; omit to include all providers. |
sending_domain_ids | array | Optional list of sending domain IDs to filter results. When provided, only statistics for the specified domains are included; omit to include all domains. |
sending_streams | array | Optional list of sending stream types to filter results (e.g., transactional, bulk). When provided, only statistics for the specified streams are included; omit to include all streams. |
get_sending_stats_by_categories Get Sending Stats by Categories
Retrieve sending statistics aggregated by email categories for a specified account and date range. Use optional filters to narrow results by sending domain, stream type, category name, or email service provider.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for the account whose sending statistics should be retrieved. |
end_date * | string | The end of the date range (inclusive) for which to retrieve statistics, specified in ISO 8601 date format (YYYY-MM-DD). |
start_date * | string | The beginning of the date range (inclusive) for which to retrieve statistics, specified in ISO 8601 date format (YYYY-MM-DD). |
categories | array | Optional list of email category names to filter results (e.g., 'Welcome Email', 'Password Reset'). When provided, only statistics for the specified categories are included; omit to include all categor… |
email_service_providers | array | Optional list of email service provider names to filter results (e.g., 'Google', 'Yahoo'). When provided, only statistics for the specified providers are included; omit to include all providers. |
sending_domain_ids | array | Optional list of sending domain IDs to filter results. When provided, only statistics for the specified domains are included; omit to include all domains. |
sending_streams | array | Optional list of sending stream types to filter results (e.g., 'transactional', 'bulk'). When provided, only statistics for the specified streams are included; omit to include all streams. |
get_account_sending_stats_by_email_service_providers Get Account Sending Stats by Email Service Providers
Retrieve sending statistics for an account aggregated by email service providers over a specified date range. Apply optional filters by sending domain, stream type, category, or specific ESP to narrow results.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for the account whose sending statistics should be retrieved. |
end_date * | string | The end of the date range (inclusive) for which to include sending statistics, specified in ISO 8601 date format (YYYY-MM-DD). |
start_date * | string | The beginning of the date range (inclusive) for which to include sending statistics, specified in ISO 8601 date format (YYYY-MM-DD). |
categories | array | Optional list of email categories to filter results (e.g., Welcome Email, Password Reset). When provided, only statistics for the specified categories are included; omit to include all categories. |
email_service_providers | array | Optional list of email service provider names to filter results (e.g., Google, Yahoo). When provided, only statistics for the specified ESPs are included; omit to include all providers. |
sending_domain_ids | array | Optional list of sending domain IDs to filter results. When provided, only statistics for the specified domains are included; omit to include all domains. |
sending_streams | array | Optional list of sending stream types to filter results (e.g., transactional, bulk). When provided, only statistics for the specified streams are included; omit to include all streams. |
get_account_sending_stats_by_date Get Account Sending Stats by Date
Retrieve sending statistics for an account over a specified date range, with optional filtering by sending domains, streams, categories, and email service providers.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for the account whose sending statistics should be retrieved. |
end_date * | string | The end of the date range (inclusive) for which to retrieve statistics, specified in ISO 8601 date format (YYYY-MM-DD). |
start_date * | string | The beginning of the date range (inclusive) for which to retrieve statistics, specified in ISO 8601 date format (YYYY-MM-DD). |
categories | array | Optional list of email categories (e.g., Welcome Email, Password Reset) to filter results. When omitted, statistics for all categories are included. |
email_service_providers | array | Optional list of email service provider names (e.g., Google, Yahoo) to filter results. When omitted, statistics for all ESPs are included. |
sending_domain_ids | array | Optional list of sending domain IDs to filter results. When omitted, statistics for all sending domains are included. |
sending_streams | array | Optional list of sending stream types (e.g., transactional, bulk) to filter results. When omitted, statistics for all sending streams are included. |
list_email_logs List Email Logs
Retrieve a paginated list of email logs for the account, filtered by sending domains accessible to the authenticated token. Results are sorted by sent_at in descending order.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The unique identifier for the account whose email logs you want to retrieve. Must be a positive integer. |
filters | object | Filter criteria to narrow results using deep object syntax (e.g., filters[field][operator] and filters[field][value]). For array values, use bracket notation (e.g., filters[field][value][]=item1). Dat… |
search_after | string | Pagination cursor for fetching the next page of results. Use the message_id UUID value from the previous response's next_page_cursor field to continue pagination. |
get_email_log_message Get Email Log Message
Retrieve a specific email message from the account's email log by its unique message identifier. The message must belong to the specified account and an accessible sending domain.
| Parameter | Type | Description |
|---|---|---|
account_id * | integer | The numeric identifier of the account that owns the email message. |
sending_message_id * | string | The unique identifier (UUID) of the email message to retrieve from the log. |