Live API · SDKs · MCP server

The email API with a real inbox behind it.

Send, read, search, and reply: one API, one key
Plug in your stack or your AI agent
Start sending in under a minute
From$0.39/mo
30-day money-back guarantee
Hostinger Mail API
Connected
cURL Node.js PHP Python
curl https://api.mail.hostinger.com/v1/emails \
  -H "Authorization: Bearer $MAIL_API_KEY" \
  -d '{
    "to": "alex@example.com",
    "subject": "Welcome aboard!"
  }'
202 Accepted, message queued

One inbox. Every way to build.

Work directly with the REST API, drop in a first-party SDK, script it from the CLI, or connect an AI agent through the live MCP server. It is the same mailbox underneath.

MCP server

Give your AI agents tools to read, send, search, and operate a real mailbox.

Node.js SDK

Add email sending and inbox workflows to JavaScript and TypeScript apps with a native developer experience.

PHP SDK

Connect websites and backend services to mailbox actions without building an API client from scratch.

Python SDK

Build automations, data workflows, and agent tools around a real email account.

Command-line interface

Inspect and manage mailbox workflows from your terminal, scripts, and CI jobs.

REST API and webhooks

Call the programmable surface directly, react to mailbox events, and send product emails when your app needs to.

Libraries & CLI

Install a first-party client and make your first call in minutes.

TypeScript / Node.js

hostinger-mail-api-sdk

npm install hostinger-mail-api-sdk

Fully typed client for the Mail API.

PHP

hostinger/mail-api-php-sdk

composer require hostinger/mail-api-php-sdk

Framework-agnostic PHP client.

Python

hostinger-mail-api

pip install hostinger-mail-api

Python client for the Mail API.

CLI

hostinger-mail

brew install hostinger/tap/hostinger-mail

Manage mail right from your terminal.

Give your agent a real inbox

A sending endpoint is not enough. Your app or agent gets a working mailbox, with an address, threads, and history, that it can operate through MCP, SDKs, or REST.

An identity

A real, verifiable email address your agent can use to sign up for services, receive confirmations, and act on your behalf.

Real conversations

Threaded replies, attachments, and multi-party threads, with a human in the loop whenever you want one.

Memory built in

Every message is a persistent, searchable record your agent can look back on to understand context and follow up.

Simple, per-mailbox pricing

Every plan includes full API, SDK, CLI, MCP, and webhook access. Sending is built for product and transactional email at modest volume.

30-day money-back guarantee

Cancel anytime

24/7 support

48 months plan

Built for developer workflows

Use the interface that fits your stack, then move between SDKs, CLI, REST, and webhooks without changing the underlying mailbox.

JSON

React in real time

{
  "event": "message.received",
  "mailbox": "agent@yourdomain.com",
  "message": {
    "from": "customer@example.com",
    "subject": "Order #1042: where is my package?",
    "thread_id": "thr_8fk2m01x"
  }
}
Subscribe to mailbox events with webhooks and trigger your logic the moment mail arrives, with no polling loops to babysit.

Node.js

Search and triage from code

const urgent = await mail.messages.search({
  query: 'is:unread label:urgent',
});

for (const message of urgent) {
  await mail.drafts.create({ replyTo: message.id });
}
Query the mailbox the way your workflow thinks: by sender, topic, or status. Then act on the results in the same call chain.

Shell

Script it from your terminal

$ hostinger-mail messages list --unread

$ hostinger-mail send \
    --to alex@example.com \
    --subject "Deploy finished"
The CLI speaks the same API, so anything your app can do you can also do from your shell, scripts, and CI jobs.

Complete control of your mail workflows

Manage credentials, follow delivery activity in the email logs, and wire up integrations without leaving your control panel.

API keys

Create keys for new projects and revoke them when you rotate credentials.

Webhook endpoints

Manage the endpoints that receive your mailbox events.

Email logs

Inspect delivery activity when you need to trace a message.
Hostinger Agentic Mail illustration for automated email workflows

Hostinger Mail for developers

Put a real inbox behind your code

Create an API key, connect your app or agent, send your first email, and start building.

Hostinger Mail API FAQs

Answers about the Mail API, MCP server, SDKs, CLI, REST API, and webhooks.

Hostinger Mail API is the programmable email surface for apps, websites, and backend services. Send email and read, search, organize, reply to, and automate a real inbox through SDKs, CLI, REST API, and webhooks.

The live Hostinger Mail MCP server gives compatible AI agents mailbox tools they can call directly. Agents can use those tools to read conversations, search for messages, draft replies, triage incoming mail, and run inbox workflows.

Hostinger Mail API combines application email sending and real inbox control in one programmable surface. It is built for product and workflow email rather than high-volume bulk delivery.

First-party SDKs are available for Node.js, PHP, and Python. You can also use the command-line interface or call the REST API directly from any language that supports HTTP.

Yes. Webhooks let your application react to mailbox activity and start workflows without repeatedly checking for changes.

Sign in to hPanel, open the API area, and create a key for your integration. Keep the key secure and do not commit it to your source code.

Visit Hostinger Mail API documentation for setup guidance, API references, and integration details.

Yes. Use the REST API, SDKs, or CLI to send email and control a real inbox from any app, website, or backend. Agents through MCP are supported but optional.