---
title: Flexmail API Integration on Truto
slug: flexmail
category: Email
canonical: "https://truto.one/integrations/detail/flexmail/"
---

# Flexmail API Integration on Truto



**Category:** Email  
**Status:** Generally available

## MCP-ready AI tools

Truto exposes 18 tools for Flexmail that AI agents can call directly.

- **list_all_flexmail_api_infos** — Retrieve general info about the Flexmail API via the root API info endpoint. Takes no parameters; the upstream documentation defines a 200 OK response but does not document its payload fields.
- **list_all_flexmail_messages** — List messages sent via Flexmail, sorted oldest to most recent, filterable by date range, recipient, sender, subject, tag, metadata and event status. Returns: message_id, created_at, recipient, sent_at, rejected_at, delivered_at, soft_bounced_at, hard_bounced_at, opened_at, clicked_at, _links. Up to 500 per page.
- **create_a_flexmail_message** — Send an email message to 1 recipient via Flexmail. Requires recipient, from, subject, and content (html is mandatory, text optional). Supports placeholder substitution, tags, metadata, open/link tracking, and up to 20 attachments (20MB total incl. base64 overhead). Returns an empty 201 response on success; the URI of the new message is returned in the Location header. Required: recipient, from, subject, content.
- **get_single_flexmail_message_by_id** — Get full details of a single Flexmail message by id, including every event registered for it. Returns: message_id, created_at, recipient, from, reply_to, return_path, subject, html, text, tracking, tag, metadata, attachments, events, _links, personalAccessToken. Required: id.
- **list_all_flexmail_senders** — List the senders registered in your Flexmail account. Returns each sender's id, email_address, verified status, and created_at. Only verified senders can be used to send email messages.
- **create_a_flexmail_sender** — Add a sender identity in Flexmail representing the From email address recipients will see. Returns the id of the newly created sender. Its domain must be a registered sending domain, and the sender only becomes usable after the verification link emailed to that address is confirmed. Required: email_address.
- **get_single_flexmail_sender_by_id** — Get the details of a single Flexmail sender by id, including its verification status. Returns: id, email_address, verified, created_at, _links, personalAccessToken. Required: id.
- **delete_a_flexmail_sender_by_id** — Delete a Flexmail sender by id. Once deleted, it can no longer be used to send email messages. Returns an empty 204 response on success. Required: id.
- **list_all_flexmail_sending_domains** — List the registered sending domains in Flexmail. Returns: id, domain, return_path, authenticated, aligned, ownership_verified, registered_at, _links.
- **create_a_flexmail_sending_domain** — Register a new sending domain in Flexmail for your email messages, optionally configuring a custom return-path for SPF alignment and DMARC pass. Returns: id, personalAccessToken. Required: sending_domain.
- **get_single_flexmail_sending_domain_by_id** — Fetch a Flexmail sending domain by id, including the validation status and DNS records of each authentication mechanism (SPF, DMARC, DKIM, return-path). Returns: id, return_path, _links, personalAccessToken. Required: id.
- **update_a_flexmail_sending_domain_by_id** — Update a registered Flexmail sending domain by id, for example to (re)configure its custom return-path. Returns an empty 204 response on success. Required: id.
- **delete_a_flexmail_sending_domain_by_id** — Delete a registered Flexmail sending domain by id. Returns an empty 204 response on success. Required: id.
- **list_all_flexmail_stats** — Fetch global message statistics for all messages sent through Flexmail, optionally limited to a period via date filters. Returns: sent, delivered, rejected, bounced, soft_bounced, hard_bounced, opens, unique_opens, clicks, unique_clicks, _links. Statistics are updated at regular intervals and are not real-time; use Flexmail's message event webhooks for real-time data.
- **list_all_flexmail_webhooks** — List all webhooks registered in Flexmail. Returns each webhook's id, event_name, target_url, verification_token, enabled, and registered_at. A webhook is disabled after 10 failed retries.
- **create_a_flexmail_webhook** — Create a webhook in Flexmail that subscribes to an event (maximum 10 webhooks per event). Returns: id. Requires event_name and target_url; if identity verification fails, the webhook is not created. Required: event_name, target_url.
- **update_a_flexmail_webhook_by_id** — Change the target URL of a webhook in Flexmail. Returns an empty 204 response on success. Requires id and target_url; identity must be verified again. Required: id, target_url.
- **delete_a_flexmail_webhook_by_id** — Delete a webhook in Flexmail by its id. Returns an empty 204 response on success. Required: id.

## How it works

1. **Link your customer's Flexmail account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach Flexmail.** The Proxy API is a 1-to-1 mapping of the Flexmail API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Offer GDPR-compliant transactional email to European customers** — SaaS companies serving EU-based users can embed Flexmail as a native email provider, giving customers an EU-hosted, privacy-first option for sending account notifications, invoices, and alerts without additional data processing agreements.
- **Automate sender and domain onboarding inside your app** — Let your users connect their Flexmail account once and provision sending domains, configure return paths, and verify sender identities directly from your UI — removing the need to context-switch into the Flexmail dashboard.
- **Power invoice and document delivery with proof-of-receipt** — Billing, ERP, and accounting platforms can send PDF invoices through their users' Flexmail accounts and surface delivery, open, and bounce timestamps on each record — eliminating 'I never got the bill' disputes.
- **Build real-time engagement timelines for CRM and ATS workflows** — Subscribe to Flexmail webhooks to update contact, candidate, or customer timelines the moment an email is delivered, opened, clicked, or bounced — giving sales, recruiting, and support teams live visibility.
- **Embed email health dashboards for your users** — Pull aggregated Flexmail stats on a schedule to render per-tenant deliverability dashboards inside your product, so customers can monitor sends, opens, and bounces without leaving your app.

## What you can build

- **Native Flexmail account connection** — Let end users connect their Flexmail account through Truto's auth flow, with credentials and token refresh handled for you.
- **In-app sending domain provisioning** — Create, update, and delete sending domains programmatically and poll verification status to guide users through DNS record setup inside your onboarding flow.
- **Sender identity management UI** — Add, list, inspect, and remove verified sender addresses so your users can manage who they send from without ever leaving your product.
- **Transactional message dispatcher** — Trigger 1:1 emails with HTML, text fallbacks, placeholder substitution, metadata, and attachments directly from your application's business logic.
- **Message audit and delivery lookup** — Fetch individual messages or list historical sends to surface delivered, bounced, opened, and clicked states on the related record in your app.
- **Webhook-driven event sync** — Programmatically register, update, and delete Flexmail webhooks so your platform ingests delivery and engagement events in real time instead of polling.

## FAQs

### How is authentication to Flexmail handled?

Truto manages the Flexmail credential exchange and attaches auth to every request. Your end users connect their Flexmail account once through Truto's connection flow — you never store or rotate API keys yourself.

### Which Flexmail operations are supported today?

Truto exposes tools for messages (list, create, get), senders (list, create, get, delete), sending domains (list, create, get, update, delete), stats (list), webhooks (list, create, update, delete), and the Flexmail API info endpoint.

### Can I send emails with attachments?

Yes. The create message tool supports Flexmail's transactional sending, including HTML, text fallbacks, metadata, placeholder substitution, and attachments (up to Flexmail's limit of 20 files and 20MB combined).

### How do I keep delivery and engagement data fresh?

Use the webhook tools to register subscriptions for delivery, bounce, open, and click events so Flexmail pushes updates to your endpoint in real time. For backfills or audits, use the list and get message tools.

### Is there a unified email API I can target instead of Flexmail-specific tools?

Not yet — Flexmail is currently exposed through its native tool set. You can build directly against the Flexmail-specific tools listed, and migrate to a unified schema later if one becomes available for this category.

### Can my users provision their own sending domains through my app?

Yes. Use the sending domain tools to create a domain, retrieve its current DNS verification state, update it, or delete it — allowing you to walk users through SPF/DKIM/DMARC setup entirely within your product.

## Related reading

- [Connect Flexmail to AI Agents: Automate Email Lifecycles](https://truto.one/blog/connect-flexmail-to-ai-agents-automate-email-lifecycles/) — Learn how to connect Flexmail to AI agents using Truto's /tools endpoint. Build autonomous email workflows with LangChain, LangGraph, and Vercel AI SDK.
