All integrations

Mailtrap

MESSAGING · EMAIL

Transactional sends, sandbox inboxes, domains and email logs on their account.

Acts as the person, not as itself

Each user connects their own account. Every call carries both identities — the agent and the person it is acting for — so the agent can never reach past what that individual can already do.

Credentials never touch the agent

Tokens live in the vault and attach server-side at call time. The agent holds a session, not a secret, and revoking access does not mean rotating a key.

Every call on the record

Who asked, which agent acted, which action ran, and the verdict that let it through — one audit trail across every integration, not one per vendor.

What an agent can do

Each action is granted on its own. An agent allowed to read is not thereby allowed to write, and the scope beside each row is what the acting user must have connected for it to run at all.

mailtrap_bulk_post_api_batchWRITE

Batch send emails. POST https://bulk.api.mailtrap.io/api/batch. DELIVERS REAL EMAIL. Send up to 500 marketing emails in a single API call. Each email can have unique recipients and content while sharing base properties. Limits: Maximum 500 messages per call Maximum 50 MB total payload size (including attachments) Note: The endpoint returns HTTP 200 even if individual messages fail. Check the responses array for individual message status.

api
mailtrap_bulk_post_api_sendWRITE

Send bulk email. POST https://bulk.api.mailtrap.io/api/send. DELIVERS REAL EMAIL. Send marketing emails and newsletters through the bulk stream optimized for high-volume sending. Use cases: Marketing campaigns Newsletters Announcements Promotional emails

api
mailtrap_delete_api_account_accesses_by_account_access_idWRITE

Remove account access. DELETE https://mailtrap.io/api/account_accesses/{account_access_id}. If specifier type is User, it removes user permissions. If specifier type is Invite or ApiToken, it removes specifier along with permissions. You have to be an account admin/owner for this endpoint to work.

api
mailtrap_delete_api_api_tokens_by_idWRITE

Delete API token. DELETE https://mailtrap.io/api/api_tokens/{id}. Permanently deletes an API token.

api
mailtrap_delete_api_contacts_by_contact_identifierWRITE

Delete contact. DELETE https://mailtrap.io/api/contacts/{contact_identifier}. Delete contact using UUID or email (URL encoded)

api
mailtrap_delete_api_contacts_fields_by_field_idWRITE

Delete Contact Field. DELETE https://mailtrap.io/api/contacts/fields/{field_id}. Delete existing Contact Field Please, note, you cannot delete a Contact Field which is used in Automations, Email Campaigns (started or scheduled), and in conditions of Contact Segments (you'll see the corresponding error)

api
mailtrap_delete_api_contacts_lists_by_list_idWRITE

Delete Contact List. DELETE https://mailtrap.io/api/contacts/lists/{list_id}. Delete existing Contact List

api
mailtrap_delete_api_domains_by_domain_idWRITE

Delete domain. DELETE https://mailtrap.io/api/domains/{domain_id}. Remove a domain from your account

api
mailtrap_delete_api_email_campaigns_by_email_campaign_idWRITE

Delete an email campaign. DELETE https://mailtrap.io/api/email_campaigns/{email_campaign_id}. Soft-deletes an email campaign. Returns 204 No Content on success. Only draft campaigns can be deleted — deleting a campaign that is already scheduled/sending returns 422. A campaign that has been started never returns to draft, so it can no longer be deleted. A scheduled campaign can be returned to draft first via the cancel or reset action endpoints.

api
mailtrap_delete_api_email_templates_by_email_template_idWRITE

Delete Email Template. DELETE https://mailtrap.io/api/email_templates/{email_template_id}. Delete an email template

api
mailtrap_delete_api_inbound_folders_by_folder_idWRITE

Delete a folder. DELETE https://mailtrap.io/api/inbound/folders/{folder_id}. Permanently delete an inbound folder along with all of its inboxes.

api
mailtrap_delete_api_inbound_folders_by_folder_id_inboxes_by_inbox_idWRITE

Delete an inbox. DELETE https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes/{inbox_id}. Permanently delete an inbox and all its received messages.

api
mailtrap_delete_api_inbound_inboxes_by_inbox_id_messages_by_idWRITE

Delete a message. DELETE https://mailtrap.io/api/inbound/inboxes/{inbox_id}/messages/{id}. Permanently delete an inbound message and its stored body and attachments.

api
mailtrap_delete_api_inbound_inboxes_by_inbox_id_threads_by_idWRITE

Delete a thread. DELETE https://mailtrap.io/api/inbound/inboxes/{inbox_id}/threads/{id}. Delete a thread. Inbound messages in the thread are removed; sent messages are preserved.

api
mailtrap_delete_api_projects_by_project_idWRITE

Delete project. DELETE https://mailtrap.io/api/projects/{project_id}. Delete project and its sandboxes.

api
mailtrap_delete_api_sandboxes_by_sandbox_idWRITE

Delete a sandbox. DELETE https://mailtrap.io/api/sandboxes/{sandbox_id}. Delete a sandbox with all its emails.

api
mailtrap_delete_api_sandboxes_by_sandbox_id_messages_by_message_idWRITE

Delete message. DELETE https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}. Delete message from sandbox.

api
mailtrap_delete_api_suppressions_by_suppression_idWRITE

Delete suppression. DELETE https://mailtrap.io/api/suppressions/{suppression_id}. Remove an email from the suppression list to allow sending again. This endpoint requires admin-level access.

api
mailtrap_delete_api_tracking_opt_outs_by_tracking_opt_out_idWRITE

Delete tracking opt-out. DELETE https://mailtrap.io/api/tracking_opt_outs/{tracking_opt_out_id}. Remove an email address from the tracking opt-out list so open and click tracking can apply again. This endpoint requires admin-level access.

api
mailtrap_delete_api_webhooks_by_webhook_idWRITE

Delete a webhook. DELETE https://mailtrap.io/api/webhooks/{webhook_id}. Permanently delete a webhook.

api
mailtrap_get_api_account_accessesREAD

List User & Invite account accesses. GET https://mailtrap.io/api/account_accesses. Get list of account accesses for which specifier_type is User or Invite. You have to have account admin/owner permissions for this endpoint to work. If you specify project_ids, sandbox_ids or domain_ids, the endpoint will return account accesses for these resources.

api
mailtrap_get_api_accountsREAD

List account(s) you have access to. GET https://mailtrap.io/api/accounts. This endpoint returns account details for the authenticated user. If you are using Organizations and Sub-Accounts and the API token was created at the organization level, the response will include all accounts within the organization.

api
mailtrap_get_api_api_tokensREAD

List API tokens. GET https://mailtrap.io/api/api_tokens. Returns all API tokens visible to the current API token.

api
mailtrap_get_api_api_tokens_by_idREAD

Get API token. GET https://mailtrap.io/api/api_tokens/{id}. Returns a single API token by id.

api
mailtrap_get_api_billing_usageREAD

Get current billing cycle usage. GET https://mailtrap.io/api/billing/usage. Get current billing cycle usage for Email Sandbox, Email Sending (Email API/SMTP), and Email Marketing.

api
mailtrap_get_api_contactsREAD

Get a list of contacts. GET https://mailtrap.io/api/contacts. Returns a paginated list of the account's contacts. Pagination is cursor based. Every response carries a pagination object; pass its next_token value back as the token query parameter to fetch the next page, and stop when next_token is null. Cursors cannot be walked backwards, so prev_token and prev_url are always null. No total count is returned. Filter values are validated rather than ignored. An unknown status, a non-integer list_id, a repeated filter parameter, or a malformed token is rejected with 422, so a mistyped filter can never widen the result set.

api
mailtrap_get_api_contacts_by_contact_identifierREAD

Get contact. GET https://mailtrap.io/api/contacts/{contact_identifier}. Get contact using UUID or email (URL encoded)

api
mailtrap_get_api_contacts_exports_by_export_idREAD

Get Contact Export. GET https://mailtrap.io/api/contacts/exports/{export_id}. Get Contact Export

api
mailtrap_get_api_contacts_fieldsREAD

Get all Contact Fields. GET https://mailtrap.io/api/contacts/fields. Get all Contact Fields existing in your account

api
mailtrap_get_api_contacts_fields_by_field_idREAD

Get Contact Field. GET https://mailtrap.io/api/contacts/fields/{field_id}. Get a contact Field by ID

api
mailtrap_get_api_contacts_imports_by_import_idREAD

Get Contact Import. GET https://mailtrap.io/api/contacts/imports/{import_id}. Get Contact Import

api
mailtrap_get_api_contacts_listsREAD

Get all Contact Lists. GET https://mailtrap.io/api/contacts/lists. Get all contact lists existing in your account

api
mailtrap_get_api_contacts_lists_by_list_idREAD

Get Contact List. GET https://mailtrap.io/api/contacts/lists/{list_id}. Get a contact list by ID

api
mailtrap_get_api_domainsREAD

List domains. GET https://mailtrap.io/api/domains. Get all domains and their verification status

api
mailtrap_get_api_domains_by_domain_idREAD

Get domain. GET https://mailtrap.io/api/domains/{domain_id}. Get details and verification status of a specific domain

api
mailtrap_get_api_domains_by_domain_id_company_infoREAD

Get company info. GET https://mailtrap.io/api/domains/{domain_id}/company_info. Get company information associated with a domain / account.

api
mailtrap_get_api_email_campaignsREAD

Get a list of email campaigns. GET https://mailtrap.io/api/email_campaigns. Returns a paginated list of the account's email campaigns, newest first. Pagination is page-token based. Use the token query parameter together with the token, next_token, and prev_token values returned in the pagination object to navigate between pages.

api
mailtrap_get_api_email_campaigns_by_email_campaign_idREAD

Get an email campaign by ID. GET https://mailtrap.io/api/email_campaigns/{email_campaign_id}. Returns a single email campaign.

api
mailtrap_get_api_email_campaigns_by_email_campaign_id_statsREAD

Get email campaign statistics. GET https://mailtrap.io/api/email_campaigns/{email_campaign_id}/stats. Returns aggregated performance metrics for a single campaign: counts and rates for deliveries, opens, clicks, bounces, spam complaints, and unsubscriptions. If the campaign has never been started, all counts and rates are returned as 0. Statistics are aggregated asynchronously and may be slightly delayed for recently sent campaigns. By default, statistics are aggregated over the whole period since the campaign was last started. Use the optional start_date and end_date query parameters to narrow the aggregation window.

api
mailtrap_get_api_email_logsREAD

List email logs. GET https://mailtrap.io/api/email_logs. Returns a paginated list of email logs (messages) for the account. Results are restricted to domains the authenticated token has access to. Invalid or unknown filters are ignored. Results are ordered by sent_at descending.

api
mailtrap_get_api_email_logs_by_sending_message_idREAD

Get an email log message by ID. GET https://mailtrap.io/api/email_logs/{sending_message_id}. Returns a single message by message UUID. Message must belong to the account and a domain the token can access.

api
mailtrap_get_api_email_templatesREAD

Get all Email Templates. GET https://mailtrap.io/api/email_templates. Get all email templates existing in your account

api
mailtrap_get_api_email_templates_by_email_template_idREAD

Get Email Template. GET https://mailtrap.io/api/email_templates/{email_template_id}. Get an email template by ID

api
mailtrap_get_api_inbound_foldersREAD

List folders. GET https://mailtrap.io/api/inbound/folders. Returns all inbound folders in the account.

api
mailtrap_get_api_inbound_folders_by_folder_idREAD

Get a folder. GET https://mailtrap.io/api/inbound/folders/{folder_id}. Returns a single inbound folder.

api
mailtrap_get_api_inbound_folders_by_folder_id_inboxesREAD

List inboxes. GET https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes. Returns all inboxes in a folder.

api
mailtrap_get_api_inbound_folders_by_folder_id_inboxes_by_inbox_idREAD

Get an inbox. GET https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes/{inbox_id}. Returns a single inbox.

api
mailtrap_get_api_inbound_inboxes_by_inbox_id_messagesREAD

List messages. GET https://mailtrap.io/api/inbound/inboxes/{inbox_id}/messages. Returns inbound messages received by the inbox, ordered by received_at descending. List responses use cursor pagination. When more results are available the response includes a last_id; pass it back as the last_id query parameter to get the next page. When last_id is null you have reached the end.

api
mailtrap_get_api_inbound_inboxes_by_inbox_id_messages_by_idREAD

Get a message. GET https://mailtrap.io/api/inbound/inboxes/{inbox_id}/messages/{id}. Returns a single inbound message together with URLs for the raw.eml file and for each attachment, plus the decoded HTML and plain-text bodies. URLs expire after one hour.

api
mailtrap_get_api_inbound_inboxes_by_inbox_id_threadsREAD

List threads. GET https://mailtrap.io/api/inbound/inboxes/{inbox_id}/threads. Returns the inbox's conversation threads, ordered by most recent activity first. Only threads and messages within your plan's retention window are included; the per-thread aggregates (message count, size, senders, recipients, attachments) are computed over those accessible messages. Results use cursor pagination. When more results are available the response includes a last_id; pass it back as the last_id query parameter to get the next page. When last_id is null you have reached the end.

api
mailtrap_get_api_inbound_inboxes_by_inbox_id_threads_by_idREAD

Get a thread. GET https://mailtrap.io/api/inbound/inboxes/{inbox_id}/threads/{id}. Returns a single thread with its messages embedded, ordered oldest first. Each message carries a visibility_status: available — the message is within your plan's retention window. The full envelope, subject, RFC headers, decoded bodies, and attachment download URLs are included; sent messages also carry their delivery lifecycle (delivery_status, delivered_at, bounced_at). placeholder — the message is outside the retention window. Only visibility_status and direction are returned; every other field is omitted and no attachment download URLs are issued.

api
mailtrap_get_api_organizations_by_organization_id_sub_accountsREAD

Get organization sub accounts. GET https://mailtrap.io/api/organizations/{organization_id}/sub_accounts. Get a list of sub accounts for the specified organization. You must have sub account management permissions for this organization.

api
mailtrap_get_api_permissions_resourcesREAD

Get resources. GET https://mailtrap.io/api/permissions/resources. Get all resources in your account (Sandboxes, Projects, Domains, Email Campaigns, Billing and Account itself) to which the token has admin access.

api
mailtrap_get_api_projectsREAD

Get a list of projects. GET https://mailtrap.io/api/projects. List projects and their sandboxes to which the API token has access.

api
mailtrap_get_api_projects_by_project_idREAD

Get project by ID. GET https://mailtrap.io/api/projects/{project_id}. Get the project and its sandboxes.

api
mailtrap_get_api_sandboxesREAD

Get a list of sandboxes. GET https://mailtrap.io/api/sandboxes. Get a list of sandboxes.

api
mailtrap_get_api_sandboxes_by_sandbox_idREAD

Get sandbox attributes. GET https://mailtrap.io/api/sandboxes/{sandbox_id}. Get sandbox attributes by sandbox id. See the list of attributes in the example

api
mailtrap_get_api_sandboxes_by_sandbox_id_messagesREAD

Get messages. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages. Get all messages in the sandbox. The response contains up to 30 messages. Use last_id or page to retrieve more.

api
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_idREAD

Show email message. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}. Get email message by ID.

api
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_analyzeREAD

Get message HTML analysis. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/analyze. Get a brief HTML report by message ID.

api
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_attachmentsREAD

Get attachments. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/attachments. Get message attachments by sandbox_id and message_id.

api
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_attachments_by_attachment_idREAD

Get single attachment. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/attachments/{attachment_id}. Get message single attachment by id.

api
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_body_htmlREAD

Get HTML message. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/body.html. Get formatted HTML email body. Not applicable for plain text emails.

api
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_body_htmlsourceREAD

Get message source. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/body.htmlsource. Get HTML source of email.

api
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_body_rawREAD

Get raw message. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/body.raw. Get raw email body.

api
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_body_txtREAD

Get text message. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/body.txt. Get text email body, if it exists.

api
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_mail_headersREAD

Get mail headers. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/mail_headers. Get mail headers of a message

api
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_spam_reportREAD

Get message spam score. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/spam_report. Get a brief spam report by message ID.

api
mailtrap_get_api_statsREAD

Get Sending Stats. GET https://mailtrap.io/api/stats. Get account sending stats. Use filters to get specific stats.

api
mailtrap_get_api_stats_categoriesREAD

Get Sending Stats by Categories. GET https://mailtrap.io/api/stats/categories. Get account sending stats by categories. Use filters to get specific stats.

api
mailtrap_get_api_stats_dateREAD

Get Sending Stats by Date. GET https://mailtrap.io/api/stats/date. Get account sending stats by date. Use filters to get specific stats.

api
mailtrap_get_api_stats_domainsREAD

Get Sending Stats by Domains. GET https://mailtrap.io/api/stats/domains. Get account sending stats by domains. Use filters to get specific stats.

api
mailtrap_get_api_stats_email_service_providersREAD

Get Sending Stats by Email Service Providers. GET https://mailtrap.io/api/stats/email_service_providers. Get account sending stats by email service providers. Use filters to get specific stats.

api
mailtrap_get_api_suppressionsREAD

List suppressions. GET https://mailtrap.io/api/suppressions. List and search suppressed email addresses. Returns up to 1000 suppressions per request. Use last_id for cursor-based pagination through large lists. Suppressed addresses will not receive any emails from your account. Rate limit: 10 requests per minute per account.

api
mailtrap_get_api_tracking_opt_outsREAD

List tracking opt-outs. GET https://mailtrap.io/api/tracking_opt_outs. List email addresses that have opted out of open and click tracking for your sending domains. Each record includes the domain it applies to. Returns up to 1000 records per request. When the response includes a non-null last_id, pass it as the last_id query parameter to fetch the next page. Rate limit: 10 requests per minute per account.

api
mailtrap_get_api_webhooksREAD

List webhooks. GET https://mailtrap.io/api/webhooks. Returns all webhooks for the account.

api
mailtrap_get_api_webhooks_by_webhook_idREAD

Get a webhook. GET https://mailtrap.io/api/webhooks/{webhook_id}. Returns a single webhook by ID.

api
mailtrap_patch_api_contacts_by_contact_identifierWRITE

Update contact. PATCH https://mailtrap.io/api/contacts/{contact_identifier}. Update contact using UUID or email (URL encoded)

api
mailtrap_patch_api_contacts_fields_by_field_idWRITE

Update Contact Field. PATCH https://mailtrap.io/api/contacts/fields/{field_id}. Update existing Contact Field. Please note, you cannot change data_type of the field.

api
mailtrap_patch_api_contacts_lists_by_list_idWRITE

Update Contact List. PATCH https://mailtrap.io/api/contacts/lists/{list_id}. Update existing Contact List

api
mailtrap_patch_api_domains_by_domain_idWRITE

Update domain. PATCH https://mailtrap.io/api/domains/{domain_id}. Update configuration settings for a domain.

api
mailtrap_patch_api_domains_by_domain_id_company_infoWRITE

Update company info. PATCH https://mailtrap.io/api/domains/{domain_id}/company_info. Update company information for a domain / account. All fields are optional; only the fields provided in the request will be updated.

api
mailtrap_patch_api_email_campaigns_by_email_campaign_idWRITE

Update an email campaign. PATCH https://mailtrap.io/api/email_campaigns/{email_campaign_id}. Updates an existing draft campaign. Only the provided attributes are changed. To edit the template (subject or design), pass template_attributes — the campaign's template is always edited in place, and only the template sub-fields you provide change (see the template_attributes schema for the partial-update rules). Update accepts the same fields as create, including the audience (contact_list_ids/contact_segment_ids). The typical flow is to create a draft, add its design and audience over one or more updates, then schedule or start it via the dedicated schedule/start action endpoints. Only draft campaigns can be updated — editing a campaign that is already scheduled/sending returns 422.

api
mailtrap_patch_api_email_templates_by_email_template_idWRITE

Update Email Template. PATCH https://mailtrap.io/api/email_templates/{email_template_id}. Update an email template

api
mailtrap_patch_api_inbound_folders_by_folder_idWRITE

Update a folder. PATCH https://mailtrap.io/api/inbound/folders/{folder_id}. Update an inbound folder.

api
mailtrap_patch_api_inbound_folders_by_folder_id_inboxes_by_inbox_idWRITE

Update an inbox. PATCH https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes/{inbox_id}. Rename an inbox. The generated address does not change.

api
mailtrap_patch_api_projects_by_project_idWRITE

Update project. PATCH https://mailtrap.io/api/projects/{project_id}. Update project name. The project name is min 2 characters and max 100 characters long.

api
mailtrap_patch_api_sandboxes_by_sandbox_idWRITE

Update a sandbox. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}. Update sandbox name, sandbox email username.

api
mailtrap_patch_api_sandboxes_by_sandbox_id_all_readWRITE

Mark as read. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}/all_read. Mark all messages in the sandbox as read.

api
mailtrap_patch_api_sandboxes_by_sandbox_id_cleanWRITE

Clean sandbox. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}/clean. Delete all messages (emails) from sandbox.

api
mailtrap_patch_api_sandboxes_by_sandbox_id_messages_by_message_idWRITE

Update message. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}. Update message attributes (right now only the is_read attribute is available for modification).

api
mailtrap_patch_api_sandboxes_by_sandbox_id_reset_credentialsWRITE

Reset credentials. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}/reset_credentials. Reset SMTP credentials of the sandbox.

api
mailtrap_patch_api_sandboxes_by_sandbox_id_reset_email_usernameWRITE

Reset email address. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}/reset_email_username. Reset username of email address per sandbox.

api
mailtrap_patch_api_sandboxes_by_sandbox_id_toggle_email_usernameWRITE

Enable email address. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}/toggle_email_username. Turn the email address of the sandbox on/off.

api
mailtrap_patch_api_webhooks_by_webhook_idWRITE

Update a webhook. PATCH https://mailtrap.io/api/webhooks/{webhook_id}. Update an existing webhook.

api
mailtrap_post_api_api_tokensWRITE

Create API token. POST https://mailtrap.io/api/api_tokens. Creates a new API token for the account with the given name and resource permissions. Unless expires_at is provided, the token expires 1 year after creation. Pass "expires_at": null to create a token that never expires. expires_at must be in the future and no more than 5 years ahead; past or unparseable values are rejected with a 422 error.

api
mailtrap_post_api_api_tokens_by_id_resetWRITE

Reset API token. POST https://mailtrap.io/api/api_tokens/{id}/reset. Expires the requested token and creates a new token with the same permissions. The old token stops working after a short grace period. The response includes the new token value (store it securely; it is only returned once). Unless expires_at is provided, the new token expires 1 year after the reset. Pass "expires_at": null to create a token that never expires. expires_at must be in the future and no more than 5 years ahead; past or unparseable values are rejected with a 422 error. Tokens that have already expired cannot be reset (returns a 422 error).

api
mailtrap_post_api_batchWRITE

Batch send emails. POST https://send.api.mailtrap.io/api/batch. DELIVERS REAL EMAIL. Send up to 500 transactional emails in a single API call. Each email can have unique recipients and content while sharing base properties. Limits: Maximum 500 messages per call Maximum 50 MB total payload size (including attachments) Note: The endpoint returns HTTP 200 even if individual messages fail. Check the responses array for individual message status.

api
mailtrap_post_api_batch_by_sandbox_idWRITE

Batch send email (including templates). POST https://sandbox.api.mailtrap.io/api/batch/{sandbox_id}. Batch send email (text, html, text&html, templates). Please note that the endpoint will return a 200-level http status, even when sending for individual messages may fail. Users of this endpoint should check the success and errors for each message in the response (the results are ordered the same as the original messages - requests). Please note that the endpoint accepts up to 500 messages per API call, and up to 50 MB payload size, including attachments.

api
mailtrap_post_api_contactsWRITE

Create a new Contact. POST https://mailtrap.io/api/contacts. Create a new contact

api
mailtrap_post_api_contacts_by_contact_identifier_eventsWRITE

Create contact event. POST https://mailtrap.io/api/contacts/{contact_identifier}/events. Submit custom event for contact

api
mailtrap_post_api_contacts_exportsWRITE

Create Contact Export. POST https://mailtrap.io/api/contacts/exports. Create a new Contact Export

api
mailtrap_post_api_contacts_fieldsWRITE

Create Contact Field. POST https://mailtrap.io/api/contacts/fields. Create new Contact Fields. Please note, you can have up to 40 fields.

api
mailtrap_post_api_contacts_importsWRITE

Import contacts. POST https://mailtrap.io/api/contacts/imports. Import contacts in bulk with support for custom fields and list management. Existing contacts with matching email addresses will be updated automatically. You can import up to 50,000 contacts per request. The import process runs asynchronously - use the returned import ID to check the status and results.

api
mailtrap_post_api_contacts_listsWRITE

Create Contact List. POST https://mailtrap.io/api/contacts/lists. Create new Contact Lists

api
mailtrap_post_api_domainsWRITE

Create domain. POST https://mailtrap.io/api/domains. Create a domain for email authentication. After creation, verify the domain by adding DNS records. Process: 1. Create the domain 2. Add DNS records (SPF, DKIM, DMARC) 3. Verify the records 4. Start sending emails

api
mailtrap_post_api_domains_by_domain_id_company_infoWRITE

Create company info. POST https://mailtrap.io/api/domains/{domain_id}/company_info. Create company information for a domain / account. Company info is required for domain compliance verification.

api
mailtrap_post_api_domains_by_domain_id_send_setup_instructionsWRITE

Send setup instructions. POST https://mailtrap.io/api/domains/{domain_id}/send_setup_instructions. Email DNS configuration instructions for the domain

api
mailtrap_post_api_email_campaignsWRITE

Create an email campaign. POST https://mailtrap.io/api/email_campaigns. Creates a new email campaign. The campaign must reference an existing sending domain via domain_id, and include a template subject within template_attributes. Create accepts the same fields as update — pick the audience with contact_list_ids/contact_segment_ids, set delivery options, and add the design via template_attributes.body_html. The campaign is always created in the draft state; scheduling and starting are separate actions (see the schedule and start endpoints).

api
mailtrap_post_api_email_campaigns_by_email_campaign_id_cancelWRITE

Cancel a scheduled email campaign. POST https://mailtrap.io/api/email_campaigns/{email_campaign_id}/cancel. Cancels a scheduled campaign, removing the pending send job and returning the campaign to the draft state. The campaign must be in the scheduled state — cancelling from any other state returns 422 ("Campaign is not scheduled").

api
mailtrap_post_api_email_campaigns_by_email_campaign_id_resetWRITE

Reset an email campaign to draft. POST https://mailtrap.io/api/email_campaigns/{email_campaign_id}/reset. Resets a campaign back to the draft state. Allowed only from the scheduled state; resetting from any other state (e.g. a sending or terminal state) returns 422.

api
mailtrap_post_api_email_campaigns_by_email_campaign_id_scheduleWRITE

Schedule an email campaign. POST https://mailtrap.io/api/email_campaigns/{email_campaign_id}/schedule. Schedules a draft campaign to start sending at a future time. Runs full sending validation (the template must have a body_html design, the audience and verified sending domain must be set, billing within limits); on failure the request returns 422 and the campaign stays a draft. The campaign must be in the draft state — scheduling from any other state returns 422. After scheduling, the time is reported back in current_state_metadata.scheduled_at.

api
mailtrap_post_api_email_campaigns_by_email_campaign_id_startWRITE

Start an email campaign. POST https://mailtrap.io/api/email_campaigns/{email_campaign_id}/start. Starts sending a draft campaign immediately. Runs full sending validation (the template must have a body_html design, the audience and verified sending domain must be set, billing within limits); on failure the request returns 422 and the campaign stays a draft. The campaign must be in the draft state — starting from any other state returns 422.

api
mailtrap_post_api_email_campaigns_by_email_campaign_id_terminateWRITE

Terminate a sending email campaign. POST https://mailtrap.io/api/email_campaigns/{email_campaign_id}/terminate. Terminates a campaign that is currently sending, aborting the in-flight send. The campaign must be in a sending state (started, queued, or paused) — terminating from any other state returns 422.

api
mailtrap_post_api_email_templatesWRITE

Create Email Template. POST https://mailtrap.io/api/email_templates. Create a new email template

api
mailtrap_post_api_inbound_foldersWRITE

Create a folder. POST https://mailtrap.io/api/inbound/folders. Create a new inbound folder.

api
mailtrap_post_api_inbound_folders_by_folder_id_inboxesWRITE

Create an inbox. POST https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes. Create a new inbox in a folder. By default Mailtrap generates the inbox address automatically based on the name. To create a catch-all inbox on your own domain, pass domain_id — the ID of a verified custom sending domain with inbound enabled. The inbox then receives mail sent to any address on that domain, and its address is returned as *@your-domain.com.

api
mailtrap_post_api_inbound_inboxes_by_inbox_id_messages_by_id_forwardWRITE

Forward a message. POST https://mailtrap.io/api/inbound/inboxes/{inbox_id}/messages/{id}/forward. Forward an inbound message to new recipients. The subject is prefixed with Fwd: (unless it already starts with one). The original message is always carried along: its rendered body is quoted below your optional note and its attachments are re-attached (any attachments you supply are added on top). A forward has no implicit recipient — you must address it with to (and optionally cc/bcc). The from rules match those of the Reply operation: rejected for Mailtrap-hosted inboxes, required-and-domain-bound for custom-domain inboxes.

api
mailtrap_post_api_inbound_inboxes_by_inbox_id_messages_by_id_replyWRITE

Reply to a message. POST https://mailtrap.io/api/inbound/inboxes/{inbox_id}/messages/{id}/reply. Send a reply to an inbound message. The reply is threaded to the original and its subject is prefixed with Re: (unless it already starts with one). By default the reply is addressed to the original sender (its Reply-To, or From when absent). Pass to to override the recipients — an explicit empty array sends to cc/bcc only — or add cc/bcc. The sender depends on the inbox type: Mailtrap-hosted inbox — always sends from the inbox's own generated address. Supplying from is rejected with 400. Custom-domain inbox — you supply from, whose address must belong to the inbox's domain.

api
mailtrap_post_api_inbound_inboxes_by_inbox_id_messages_by_id_reply_allWRITE

Reply all to a message. POST https://mailtrap.io/api/inbound/inboxes/{inbox_id}/messages/{id}/reply_all. Send a reply to an inbound message and copy the original's other recipients. Behaves exactly like the Reply to a message operation, except cc defaults to the original's To + Cc — minus the inbox's own addresses and the sender (already in To). Pass to, cc, or bcc to override the computed recipients. As with a plain reply, the subject is prefixed with Re.

api
mailtrap_post_api_organizations_by_organization_id_sub_accountsWRITE

Create organization sub account. POST https://mailtrap.io/api/organizations/{organization_id}/sub_accounts. Create a new sub account under the specified organization. You must have sub account management permissions for this organization.

api
mailtrap_post_api_projectsWRITE

Create project. POST https://mailtrap.io/api/projects. The project name is min 2 characters and max 100 characters long.

api
mailtrap_post_api_projects_by_project_id_sandboxesWRITE

Create a sandbox. POST https://mailtrap.io/api/projects/{project_id}/sandboxes. Create a sandbox in a project.

api
mailtrap_post_api_sandboxes_by_sandbox_id_messages_by_message_id_forwardWRITE

Forward message. POST https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/forward. Forward message to an email address. The email address must be confirmed by the recipient in advance.

api
mailtrap_post_api_sendWRITE

Send transactional email. POST https://send.api.mailtrap.io/api/send. DELIVERS REAL EMAIL. Send a single transactional email with text, HTML, or template content. Use this endpoint for: Order confirmations Password reset emails Account notifications Welcome emails System alerts

api
mailtrap_post_api_send_by_sandbox_idWRITE

Send email (including templates). POST https://sandbox.api.mailtrap.io/api/send/{sandbox_id}. Send email message to the specified sandbox.

api
mailtrap_post_api_suppressionsWRITE

Create suppression. POST https://mailtrap.io/api/suppressions. Add an email address to the suppression list. Suppressed addresses will not receive any emails from your account. This endpoint requires admin-level access. Rate limit: 10 requests per minute per account.

api
mailtrap_post_api_tracking_opt_outsWRITE

Create tracking opt-out. POST https://mailtrap.io/api/tracking_opt_outs. Add an email address to the tracking opt-out list for a sending domain. Opted-out addresses are excluded from open and click tracking on that domain. This endpoint requires admin-level access. Rate limit: 10 requests per minute per account.

api
mailtrap_post_api_webhooksWRITE

Create a webhook. POST https://mailtrap.io/api/webhooks. Create a new webhook for the account. The response includes a signing_secret that is used to verify webhook signatures.

api
mailtrap_put_api_account_accesses_by_account_access_id_permissions_bulkWRITE

Manage user or token permissions. PUT https://mailtrap.io/api/account_accesses/{account_access_id}/permissions/bulk. Manage user or token permissions. For this endpoint, you should send an array of objects (in JSON format) as the body of the request. If you send a combination of resource_type and resource_id that already exists, the permission is updated. If the combination doesn't exist, the permission is created. Permissions of an expired API token cannot be updated; such requests are rejected with a 422 error.

api

Put Mailtrap behind one governed endpoint.

Same permissions, same audit trail, whatever else you connect next.