MESSAGING · EMAIL
Transactional sends, sandbox inboxes, domains and email logs on their account.
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.
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.
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.
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_batchWRITEBatch 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.
mailtrap_bulk_post_api_sendWRITESend 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
mailtrap_delete_api_account_accesses_by_account_access_idWRITERemove 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.
mailtrap_delete_api_api_tokens_by_idWRITEDelete API token. DELETE https://mailtrap.io/api/api_tokens/{id}. Permanently deletes an API token.
mailtrap_delete_api_contacts_by_contact_identifierWRITEDelete contact. DELETE https://mailtrap.io/api/contacts/{contact_identifier}. Delete contact using UUID or email (URL encoded)
mailtrap_delete_api_contacts_fields_by_field_idWRITEDelete 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)
mailtrap_delete_api_contacts_lists_by_list_idWRITEDelete Contact List. DELETE https://mailtrap.io/api/contacts/lists/{list_id}. Delete existing Contact List
mailtrap_delete_api_domains_by_domain_idWRITEDelete domain. DELETE https://mailtrap.io/api/domains/{domain_id}. Remove a domain from your account
mailtrap_delete_api_email_campaigns_by_email_campaign_idWRITEDelete 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.
mailtrap_delete_api_email_templates_by_email_template_idWRITEDelete Email Template. DELETE https://mailtrap.io/api/email_templates/{email_template_id}. Delete an email template
mailtrap_delete_api_inbound_folders_by_folder_idWRITEDelete a folder. DELETE https://mailtrap.io/api/inbound/folders/{folder_id}. Permanently delete an inbound folder along with all of its inboxes.
mailtrap_delete_api_inbound_folders_by_folder_id_inboxes_by_inbox_idWRITEDelete an inbox. DELETE https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes/{inbox_id}. Permanently delete an inbox and all its received messages.
mailtrap_delete_api_inbound_inboxes_by_inbox_id_messages_by_idWRITEDelete a message. DELETE https://mailtrap.io/api/inbound/inboxes/{inbox_id}/messages/{id}. Permanently delete an inbound message and its stored body and attachments.
mailtrap_delete_api_inbound_inboxes_by_inbox_id_threads_by_idWRITEDelete 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.
mailtrap_delete_api_projects_by_project_idWRITEDelete project. DELETE https://mailtrap.io/api/projects/{project_id}. Delete project and its sandboxes.
mailtrap_delete_api_sandboxes_by_sandbox_idWRITEDelete a sandbox. DELETE https://mailtrap.io/api/sandboxes/{sandbox_id}. Delete a sandbox with all its emails.
mailtrap_delete_api_sandboxes_by_sandbox_id_messages_by_message_idWRITEDelete message. DELETE https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}. Delete message from sandbox.
mailtrap_delete_api_suppressions_by_suppression_idWRITEDelete 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.
mailtrap_delete_api_tracking_opt_outs_by_tracking_opt_out_idWRITEDelete 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.
mailtrap_delete_api_webhooks_by_webhook_idWRITEDelete a webhook. DELETE https://mailtrap.io/api/webhooks/{webhook_id}. Permanently delete a webhook.
mailtrap_get_api_account_accessesREADList 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.
mailtrap_get_api_accountsREADList 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.
mailtrap_get_api_api_tokensREADList API tokens. GET https://mailtrap.io/api/api_tokens. Returns all API tokens visible to the current API token.
mailtrap_get_api_api_tokens_by_idREADGet API token. GET https://mailtrap.io/api/api_tokens/{id}. Returns a single API token by id.
mailtrap_get_api_billing_usageREADGet 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.
mailtrap_get_api_contactsREADGet 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.
mailtrap_get_api_contacts_by_contact_identifierREADGet contact. GET https://mailtrap.io/api/contacts/{contact_identifier}. Get contact using UUID or email (URL encoded)
mailtrap_get_api_contacts_exports_by_export_idREADGet Contact Export. GET https://mailtrap.io/api/contacts/exports/{export_id}. Get Contact Export
mailtrap_get_api_contacts_fieldsREADGet all Contact Fields. GET https://mailtrap.io/api/contacts/fields. Get all Contact Fields existing in your account
mailtrap_get_api_contacts_fields_by_field_idREADGet Contact Field. GET https://mailtrap.io/api/contacts/fields/{field_id}. Get a contact Field by ID
mailtrap_get_api_contacts_imports_by_import_idREADGet Contact Import. GET https://mailtrap.io/api/contacts/imports/{import_id}. Get Contact Import
mailtrap_get_api_contacts_listsREADGet all Contact Lists. GET https://mailtrap.io/api/contacts/lists. Get all contact lists existing in your account
mailtrap_get_api_contacts_lists_by_list_idREADGet Contact List. GET https://mailtrap.io/api/contacts/lists/{list_id}. Get a contact list by ID
mailtrap_get_api_domainsREADList domains. GET https://mailtrap.io/api/domains. Get all domains and their verification status
mailtrap_get_api_domains_by_domain_idREADGet domain. GET https://mailtrap.io/api/domains/{domain_id}. Get details and verification status of a specific domain
mailtrap_get_api_domains_by_domain_id_company_infoREADGet company info. GET https://mailtrap.io/api/domains/{domain_id}/company_info. Get company information associated with a domain / account.
mailtrap_get_api_email_campaignsREADGet 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.
mailtrap_get_api_email_campaigns_by_email_campaign_idREADGet an email campaign by ID. GET https://mailtrap.io/api/email_campaigns/{email_campaign_id}. Returns a single email campaign.
mailtrap_get_api_email_campaigns_by_email_campaign_id_statsREADGet 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.
mailtrap_get_api_email_logsREADList 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.
mailtrap_get_api_email_logs_by_sending_message_idREADGet 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.
mailtrap_get_api_email_templatesREADGet all Email Templates. GET https://mailtrap.io/api/email_templates. Get all email templates existing in your account
mailtrap_get_api_email_templates_by_email_template_idREADGet Email Template. GET https://mailtrap.io/api/email_templates/{email_template_id}. Get an email template by ID
mailtrap_get_api_inbound_foldersREADList folders. GET https://mailtrap.io/api/inbound/folders. Returns all inbound folders in the account.
mailtrap_get_api_inbound_folders_by_folder_idREADGet a folder. GET https://mailtrap.io/api/inbound/folders/{folder_id}. Returns a single inbound folder.
mailtrap_get_api_inbound_folders_by_folder_id_inboxesREADList inboxes. GET https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes. Returns all inboxes in a folder.
mailtrap_get_api_inbound_folders_by_folder_id_inboxes_by_inbox_idREADGet an inbox. GET https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes/{inbox_id}. Returns a single inbox.
mailtrap_get_api_inbound_inboxes_by_inbox_id_messagesREADList 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.
mailtrap_get_api_inbound_inboxes_by_inbox_id_messages_by_idREADGet 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.
mailtrap_get_api_inbound_inboxes_by_inbox_id_threadsREADList 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.
mailtrap_get_api_inbound_inboxes_by_inbox_id_threads_by_idREADGet 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.
mailtrap_get_api_organizations_by_organization_id_sub_accountsREADGet 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.
mailtrap_get_api_permissions_resourcesREADGet 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.
mailtrap_get_api_projectsREADGet a list of projects. GET https://mailtrap.io/api/projects. List projects and their sandboxes to which the API token has access.
mailtrap_get_api_projects_by_project_idREADGet project by ID. GET https://mailtrap.io/api/projects/{project_id}. Get the project and its sandboxes.
mailtrap_get_api_sandboxesREADGet a list of sandboxes. GET https://mailtrap.io/api/sandboxes. Get a list of sandboxes.
mailtrap_get_api_sandboxes_by_sandbox_idREADGet sandbox attributes. GET https://mailtrap.io/api/sandboxes/{sandbox_id}. Get sandbox attributes by sandbox id. See the list of attributes in the example
mailtrap_get_api_sandboxes_by_sandbox_id_messagesREADGet 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.
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_idREADShow email message. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}. Get email message by ID.
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_analyzeREADGet message HTML analysis. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/analyze. Get a brief HTML report by message ID.
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_attachmentsREADGet attachments. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/attachments. Get message attachments by sandbox_id and message_id.
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_attachments_by_attachment_idREADGet single attachment. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/attachments/{attachment_id}. Get message single attachment by id.
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_body_htmlREADGet 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.
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_body_htmlsourceREADGet message source. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/body.htmlsource. Get HTML source of email.
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_body_rawREADGet raw message. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/body.raw. Get raw email body.
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_body_txtREADGet text message. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/body.txt. Get text email body, if it exists.
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_mail_headersREADGet mail headers. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/mail_headers. Get mail headers of a message
mailtrap_get_api_sandboxes_by_sandbox_id_messages_by_message_id_spam_reportREADGet message spam score. GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/spam_report. Get a brief spam report by message ID.
mailtrap_get_api_statsREADGet Sending Stats. GET https://mailtrap.io/api/stats. Get account sending stats. Use filters to get specific stats.
mailtrap_get_api_stats_categoriesREADGet Sending Stats by Categories. GET https://mailtrap.io/api/stats/categories. Get account sending stats by categories. Use filters to get specific stats.
mailtrap_get_api_stats_dateREADGet Sending Stats by Date. GET https://mailtrap.io/api/stats/date. Get account sending stats by date. Use filters to get specific stats.
mailtrap_get_api_stats_domainsREADGet Sending Stats by Domains. GET https://mailtrap.io/api/stats/domains. Get account sending stats by domains. Use filters to get specific stats.
mailtrap_get_api_stats_email_service_providersREADGet 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.
mailtrap_get_api_suppressionsREADList 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.
mailtrap_get_api_tracking_opt_outsREADList 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.
mailtrap_get_api_webhooksREADList webhooks. GET https://mailtrap.io/api/webhooks. Returns all webhooks for the account.
mailtrap_get_api_webhooks_by_webhook_idREADGet a webhook. GET https://mailtrap.io/api/webhooks/{webhook_id}. Returns a single webhook by ID.
mailtrap_patch_api_contacts_by_contact_identifierWRITEUpdate contact. PATCH https://mailtrap.io/api/contacts/{contact_identifier}. Update contact using UUID or email (URL encoded)
mailtrap_patch_api_contacts_fields_by_field_idWRITEUpdate 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.
mailtrap_patch_api_contacts_lists_by_list_idWRITEUpdate Contact List. PATCH https://mailtrap.io/api/contacts/lists/{list_id}. Update existing Contact List
mailtrap_patch_api_domains_by_domain_idWRITEUpdate domain. PATCH https://mailtrap.io/api/domains/{domain_id}. Update configuration settings for a domain.
mailtrap_patch_api_domains_by_domain_id_company_infoWRITEUpdate 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.
mailtrap_patch_api_email_campaigns_by_email_campaign_idWRITEUpdate 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.
mailtrap_patch_api_email_templates_by_email_template_idWRITEUpdate Email Template. PATCH https://mailtrap.io/api/email_templates/{email_template_id}. Update an email template
mailtrap_patch_api_inbound_folders_by_folder_idWRITEUpdate a folder. PATCH https://mailtrap.io/api/inbound/folders/{folder_id}. Update an inbound folder.
mailtrap_patch_api_inbound_folders_by_folder_id_inboxes_by_inbox_idWRITEUpdate an inbox. PATCH https://mailtrap.io/api/inbound/folders/{folder_id}/inboxes/{inbox_id}. Rename an inbox. The generated address does not change.
mailtrap_patch_api_projects_by_project_idWRITEUpdate project. PATCH https://mailtrap.io/api/projects/{project_id}. Update project name. The project name is min 2 characters and max 100 characters long.
mailtrap_patch_api_sandboxes_by_sandbox_idWRITEUpdate a sandbox. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}. Update sandbox name, sandbox email username.
mailtrap_patch_api_sandboxes_by_sandbox_id_all_readWRITEMark as read. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}/all_read. Mark all messages in the sandbox as read.
mailtrap_patch_api_sandboxes_by_sandbox_id_cleanWRITEClean sandbox. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}/clean. Delete all messages (emails) from sandbox.
mailtrap_patch_api_sandboxes_by_sandbox_id_messages_by_message_idWRITEUpdate 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).
mailtrap_patch_api_sandboxes_by_sandbox_id_reset_credentialsWRITEReset credentials. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}/reset_credentials. Reset SMTP credentials of the sandbox.
mailtrap_patch_api_sandboxes_by_sandbox_id_reset_email_usernameWRITEReset email address. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}/reset_email_username. Reset username of email address per sandbox.
mailtrap_patch_api_sandboxes_by_sandbox_id_toggle_email_usernameWRITEEnable email address. PATCH https://mailtrap.io/api/sandboxes/{sandbox_id}/toggle_email_username. Turn the email address of the sandbox on/off.
mailtrap_patch_api_webhooks_by_webhook_idWRITEUpdate a webhook. PATCH https://mailtrap.io/api/webhooks/{webhook_id}. Update an existing webhook.
mailtrap_post_api_api_tokensWRITECreate 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.
mailtrap_post_api_api_tokens_by_id_resetWRITEReset 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).
mailtrap_post_api_batchWRITEBatch 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.
mailtrap_post_api_batch_by_sandbox_idWRITEBatch 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.
mailtrap_post_api_contactsWRITECreate a new Contact. POST https://mailtrap.io/api/contacts. Create a new contact
mailtrap_post_api_contacts_by_contact_identifier_eventsWRITECreate contact event. POST https://mailtrap.io/api/contacts/{contact_identifier}/events. Submit custom event for contact
mailtrap_post_api_contacts_exportsWRITECreate Contact Export. POST https://mailtrap.io/api/contacts/exports. Create a new Contact Export
mailtrap_post_api_contacts_fieldsWRITECreate Contact Field. POST https://mailtrap.io/api/contacts/fields. Create new Contact Fields. Please note, you can have up to 40 fields.
mailtrap_post_api_contacts_importsWRITEImport 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.
mailtrap_post_api_contacts_listsWRITECreate Contact List. POST https://mailtrap.io/api/contacts/lists. Create new Contact Lists
mailtrap_post_api_domainsWRITECreate 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
mailtrap_post_api_domains_by_domain_id_company_infoWRITECreate 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.
mailtrap_post_api_domains_by_domain_id_send_setup_instructionsWRITESend setup instructions. POST https://mailtrap.io/api/domains/{domain_id}/send_setup_instructions. Email DNS configuration instructions for the domain
mailtrap_post_api_email_campaignsWRITECreate 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).
mailtrap_post_api_email_campaigns_by_email_campaign_id_cancelWRITECancel 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").
mailtrap_post_api_email_campaigns_by_email_campaign_id_resetWRITEReset 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.
mailtrap_post_api_email_campaigns_by_email_campaign_id_scheduleWRITESchedule 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.
mailtrap_post_api_email_campaigns_by_email_campaign_id_startWRITEStart 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.
mailtrap_post_api_email_campaigns_by_email_campaign_id_terminateWRITETerminate 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.
mailtrap_post_api_email_templatesWRITECreate Email Template. POST https://mailtrap.io/api/email_templates. Create a new email template
mailtrap_post_api_inbound_foldersWRITECreate a folder. POST https://mailtrap.io/api/inbound/folders. Create a new inbound folder.
mailtrap_post_api_inbound_folders_by_folder_id_inboxesWRITECreate 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.
mailtrap_post_api_inbound_inboxes_by_inbox_id_messages_by_id_forwardWRITEForward 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.
mailtrap_post_api_inbound_inboxes_by_inbox_id_messages_by_id_replyWRITEReply 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.
mailtrap_post_api_inbound_inboxes_by_inbox_id_messages_by_id_reply_allWRITEReply 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.
mailtrap_post_api_organizations_by_organization_id_sub_accountsWRITECreate 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.
mailtrap_post_api_projectsWRITECreate project. POST https://mailtrap.io/api/projects. The project name is min 2 characters and max 100 characters long.
mailtrap_post_api_projects_by_project_id_sandboxesWRITECreate a sandbox. POST https://mailtrap.io/api/projects/{project_id}/sandboxes. Create a sandbox in a project.
mailtrap_post_api_sandboxes_by_sandbox_id_messages_by_message_id_forwardWRITEForward 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.
mailtrap_post_api_sendWRITESend 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
mailtrap_post_api_send_by_sandbox_idWRITESend email (including templates). POST https://sandbox.api.mailtrap.io/api/send/{sandbox_id}. Send email message to the specified sandbox.
mailtrap_post_api_suppressionsWRITECreate 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.
mailtrap_post_api_tracking_opt_outsWRITECreate 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.
mailtrap_post_api_webhooksWRITECreate 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.
mailtrap_put_api_account_accesses_by_account_access_id_permissions_bulkWRITEManage 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.
Put Mailtrap behind one governed endpoint.
Same permissions, same audit trail, whatever else you connect next.