mailtanimailtani

Introduction

The Mailtani API allows you to programmatically send emails, manage contacts, lists, campaigns, segments, and trigger flow automations. All API access is over HTTPS and responses are returned in JSON format.

Mailtani supports multiple email providers — Amazon SES, Resend, and Mailtrap — configured per domain. Your API key and sending infrastructure is shared across all provider types transparently.

Base URL

https://mailtani.com/api/v1

Authentication

Authenticate your requests by including your API key in the Authorization header as a Bearer token.

Authorization: Bearer mk_your_api_key_here

API keys can be created and managed from the Settings > API Keys page in your dashboard.

Project Context

All API requests are scoped to the project associated with your API key. Pass the X-Project-Id header to specify which project to operate on.

X-Project-Id: 1

If you only have one project, this header is optional and defaults to your first project.

Request Format

  • Send request bodies as JSON with Content-Type: application/json
  • All timestamps are returned in ISO 8601 format
  • Pagination follows the standard page query parameter pattern

Response Format

Successful responses return data directly or wrapped in a data key for collections:

{
  "data": [
    { "id": 1, "email": "[email protected]" }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 25,
    "total": 100
  }
}

Single resource responses:

{
  "data": {
    "id": 1,
    "email": "[email protected]"
  }
}

Quick Start

  1. Create an API key in Settings > API Keys
  2. Set up a verified domain and sending email in your dashboard
  3. Send your first email:
curl -X POST https://mailtani.com/api/v1/emails \
  -H "Authorization: Bearer mk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "[email protected]",
    "to": "[email protected]",
    "subject": "Hello from Mailtani",
    "html": "<p>Welcome!</p>"
  }'