Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Mail API

Read, search, send and organise mail in your Hostinger Email mailboxes over HTTPS. Authentication, request and response format, and every Mail API endpoint.

The Mail API works with the contents of the mailboxes on your Hostinger Email plan: list and search messages, read and move them, send mail, manage folders, check quota, and subscribe to mailbox events with webhooks. It's the API behind Agentic Mail, the Email SDKs, the hostinger-mail CLI, and the email MCP server.

Every endpoint page in this section is rendered from the Mail API OpenAPI specification, so parameters, schemas and responses always match the live API.

Note: The Mail API is separate from the Hostinger API at developers.hostinger.com. It has its own base URL and its own tokens, and the two don't accept each other's tokens. The Hostinger API's Mail endpoints set up the email service itself — orders, mailboxes, aliases, forwarders, and the tokens for this API. Use the Mail API to work with what's inside a mailbox.

Authentication

  1. Create a token under Agentic Mail → API access in your email domain's sidebar. Agentic Mail covers the steps and the permissions you can give it.

  2. Send it as a bearer header on every request:

curl https://api.mail.hostinger.com/api/v1/me \
  -H "Authorization: Bearer YOUR_MAIL_API_TOKEN"

A token belongs to a single email order. It can reach every mailbox in that order, or only the mailboxes you picked when you created it. Tokens from hPanel → API don't work here.

Making requests

The base URL is https://api.mail.hostinger.com, and every path starts with /api/v1/.

Start with Get the authenticated account. It returns the mailboxes your token can manage, and every other endpoint takes one of their resource IDs as {mailboxResourceId}. Endpoints that work on messages also take a {folder}, such as INBOX. URL-encode folder paths that contain / or spaces.

Send request bodies as JSON with Content-Type: application/json.

Responses

Every response except 204 No Content wraps its payload in a data field:

List endpoints accept page and perPage (up to 100) and add a pagination object next to data:

Errors

4xx and 5xx responses share one shape. Branch on code in your code. error is a readable message for logs and support tickets.

Rate limits

Too many requests in a short time return 429 Too Many Requests. Wait before retrying. Repeatedly hitting the limit can get your IP address blocked for a while.

Endpoints

  • Account: the authenticated account and the mailboxes it can manage

  • Folders: list, create, rename and delete folders

  • Messages: list, search, read, flag, move and delete messages, and download attachments

  • Send: send mail from a mailbox

  • Webhooks: get notified when something happens in a mailbox

  • Quota: storage and message usage

  • Feedback: report a problem or missing capability in the API or the MCP server

Other ways to use the Mail API

  • Code: the Email SDKs for PHP, Python and TypeScript.

  • Terminal: the hostinger-mail CLI, described on the same page.

  • AI assistants: the email MCP server at https://mcp.mail.hostinger.com/mcp. See Agentic Mail.


Last updated: October 27, 2026

Last updated

Was this helpful?