Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Mails.ai API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fmails.ai%2Fmails-ai" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fmails.ai%2Fmails-ai" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Mails.ai API.
Send a message from a named agent with POST /v1/messages, or up to 100 messages at once with POST /v1/messages/batch, using an Idempotency-Key header to avoid double sends
Reply to, forward, reschedule, or cancel a sent message by its id
Read received messages and full threads, with SPF and DKIM results and extracted text on each inbound message
Follow inbound activity through cursor-paginated events filtered by event_type, agent_id, and since, or a live Server-Sent Events stream
GET STARTED
Create agents with daily_send_limit, hourly_send_limit, allowlist_domains, blocklist_domains, and classify_inbound settings
Register webhook endpoints, inspect delivery attempts, and replay a failed delivery
Add and verify custom send domains, and simulate inbound mail end to end with a mk_test_ key
Patterns agents use Mails.ai API for, with concrete tasks.
★ An agent mailbox connected through Jentic
A support agent gets its own Mails.ai identity, reads inbound messages that arrive already classified for intent and prompt injection, and replies in thread. Through Jentic the agent finds the send and reply operations by intent, the mk_live_ key stays in the developer's own Jentic One instance, and a rule can keep the agent on reading and replying while key, domain, and billing operations stay out.
Call GET /v1/messages/received with agent_id 'support' and limit 10, then POST /v1/messages/{id}/reply on the newest message with body_text 'Thanks, we are looking into it.'
Transactional sends with idempotency
Order and account notifications go out through POST /v1/messages with to and subject required and body_text or body_html as content, or in batches of up to 100 through POST /v1/messages/batch where per-message failures come back inline. Passing the same Idempotency-Key on a retry replays the stored response instead of sending twice, and scheduled_at defers delivery.
POST /v1/messages with agent 'support', to 'jordan@example.com', subject 'Your order #10473 has shipped', body_text, and an Idempotency-Key header of 'order-10473-shipped'
Inbound event handling with webhooks
To react to incoming mail, register an endpoint with POST /v1/webhooks and a list of event_types, then watch GET /v1/webhooks/{id}/deliveries for failed attempts and replay them with POST /v1/webhook-deliveries/{id}/replay. Where webhooks are not practical, GET /v1/events/stream provides a Server-Sent Events tail that resumes from the last event id.
POST /v1/webhooks with url 'https://example.com/hooks/mail' and event_types ['message.received'], then POST /v1/webhooks/{id}/test to send a test event
Testing an integration without sending real mail
A mk_test_ key exercises the whole API with real validation and real events but no outbound mail or cost. POST /v1/test/inbound simulates an inbound email for a given agent, from address, and body_text, so the classifier, events, and webhooks can be tested before switching to a live key.
Using a mk_test_ key, POST /v1/test/inbound with agent 'support', from 'customer@example.com', and body_text 'Where is my order?', then GET /v1/events with since set to the current time
57 endpoints — the mails.
METHOD
PATH
DESCRIPTION
/v1/messages
Send a message
/v1/messages/batch
Send a batch of messages
/v1/messages/{id}/reply
Reply to a message
/v1/messages/received
List received messages
/v1/threads/{id}
Retrieve a thread with messages
/v1/agents
Create an agent
/v1/events
List events
/v1/webhooks
Create a webhook endpoint
/v1/messages
Send a message
/v1/messages/batch
Send a batch of messages
/v1/messages/{id}/reply
Reply to a message
/v1/messages/received
List received messages
/v1/threads/{id}
Retrieve a thread with messages
/v1/agents
Create an agent
/v1/events
List events
/v1/webhooks
Create a webhook endpoint
What agents get from Jentic-routed access to this vendor.
Setup
Wiring Mails.ai by hand means handling its bearer keys with send, read, and manage scopes, switching between mk_test_ and mk_live_ modes, cursor pagination, and Idempotency-Key headers yourself. Through Jentic you install once, import Mails.ai from the API Directory, store the key once, and your agent calls it.
Permission scoping
Mails.ai puts message, thread, agent, and webhook ids in the URL path, so a rule can pin your agent to one thread or one message's reply and forward operations. New sends carry the agent and recipients in the request body, so those are bounded by operation, and you choose the operations it may call, so destructive ones like revoking API keys or deleting domains are not included unless you add them.
Credential isolation
Your Mails.ai API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'send an email' or 'list received messages', and Jentic returns the matching Mails.ai operation with its input schema so the agent calls the right endpoint without browsing the reference docs.
Alternatives and complements available in the Jentic catalogue.
Specific to using Mails.ai API through Jentic.
Is there a Mails.ai MCP server?
You don't need an MCP server to give your agent Mails.ai. Jentic connects it directly from the API Directory: import it, store your API key once, and your agent calls it. Operations are discovered on demand, so the API's many operations do not load as tool definitions into the agent's context.
What authentication does the Mails.ai API use?
Per its OpenAPI spec, the Mails.ai API uses bearer authentication with a mk_live_ or mk_test_ key in the Authorization header. Keys carry send, read, or manage scopes, and each operation notes the scope it needs. The unsubscribe and health check operations are open and take no key. Through Jentic the key is stored encrypted by your own Jentic One instance and injected at execution time, so it never enters the agent's context.
Can I limit what my agent is allowed to do with Mails.ai?
Yes. For example, write a rule that allows GET /v1/messages/received, GET /v1/threads/{id}, and POST /v1/messages/{id}/reply, so the agent can read its inbox and answer existing conversations but cannot start new sends, create API keys, or delete domains. Every call it makes is logged on your own machine.
Does Mails.ai protect my agent from prompt injection in incoming email?
Inbound messages are run through an intent and prompt-injection classifier. The classification includes an injection_score and injection_categories alongside intent, entities, urgency, and sender_reputation, so your agent can check the score before acting on a message. Classification is controlled per agent with the classify_inbound setting.
How do I send an email through Jentic?
Install Jentic One, import the Mails.ai API from the directory, and search for 'send an email from my agent'. Jentic returns the sendMessage operation with its input schema; your agent supplies to and subject plus body_text or body_html, and can add an Idempotency-Key header for safe retries. To run it on your own infrastructure, install Jentic One from its GitHub repo.
Can I test Mails.ai without sending real email?
Yes. A mk_test_ key runs the full API with real validation, persisted resources, and real events and webhooks, but sends no real email and incurs no cost. Use POST /v1/test/inbound with a test key to simulate an inbound message end to end.
What are the rate limits for the Mails.ai API?
The OpenAPI spec does not state request rate limits for the API itself. Per-agent sending is capped by the daily_send_limit and hourly_send_limit settings on each agent. Check https://mails.ai for current account limits.
For Agents
Give your agent its own mailbox to send, reply to, forward, and schedule email, read classified inbound messages and threads, and manage webhooks, domains, and send limits.
Use for: Send an order confirmation email from my support agent, Reply to the last message in this customer thread, List all received messages for the sales agent, Check whether an inbound email was flagged by the injection classifier
Not supported: Does not handle marketing campaign design, contact list management, SMS, or email address verification. Use for sending and receiving email from AI agent mailboxes only.
The Mails.ai API gives AI agents their own email identity, sending and receiving transactional email through per-agent mailboxes. Outbound mail goes out as single sends, batches of up to 100 messages, replies, forwards, scheduled sends, and drafts, with an Idempotency-Key header to stop duplicate sends. Inbound mail is run through an intent and prompt-injection classifier and delivered as typed events you can list, stream over Server-Sent Events, or receive by webhook. The API also manages agents with send limits and domain allowlists, custom send domains, API keys with send, read, and manage scopes, threads, suppression, and reputation.
This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.
Base layer of spec validity and structural soundness.
Aggregated quality score from linter diagnostics, weighted by severity.
Percentage of `$ref` references that resolve successfully.
Checks whether the API description parses successfully and conforms to its declared specification (e.g., OpenAPI).
Structural correctness score based on schema issues using logarithmic dampening.
Clarity, completeness, and ingestion readiness for developers and tooling.
How richly the API is illustrated with examples.
Percentage of examples that conform to their schemas.
Percentage of operations with complete response definitions (success, client error, server error).
Health of API ingestion, bundling, and resolution within Jentic pipelines.
Semantic breadth, depth, and agent comprehension for AI systems.
Coverage of descriptions across API elements.
Coverage of RFC 9457 Problem Details for error responses.
Coverage, uniqueness, and casing consistency of operationIds for AI inference.
Coverage of summaries across operations/tags/info.
Functional utility, complexity comfort, and AI orchestration readiness.
Agent comfort level based on API operational and structural complexity.
Trust, risk posture, and security compliance.
Average quality of security schemes based on authentication method strength (weakest link for OAuth2).
Findability, semantic richness, and reasoning readiness.
Clarity and depth of descriptions across API elements.
Score it yourself
Every API in the directory is allowlisted, so you can re-score it with no key required.
npx @jentic/api-scorecard-cli score <openapi-url>