Skip to main content

API Overview

Base URL: https://api.mailofly.com (paths are /v1/..., e.g. https://api.mailofly.com/v1/emails)
Legacy: https://www.mailofly.com/api/v1/... on the web app remains available during migration; new integrations should use api.mailofly.com/v1/....

Quick start


Authentication

Missing or invalid keys return 401:
Create keys at API keys.

Response format

Success

List endpoints wrap results:
Single resources:
Creates return 201 with { "data": … }.

Errors


Resources


Pagination

List endpoints accept:

Send email (transactional)

Use GET /v1/emails to list sent transactional emails (Resend cursor: limit, after, before) or GET /v1/emails/:id to retrieve one (includes html). Send with POST /v1/emails or batch with POST /v1/emails/batch. All match Resend’s email APIs, plus optional account_key (acc_…):
Optional: cc, bcc, reply_to, headers, tags, attachments, template ({ id, variables }). Returns { "id": "mail-log-uuid" }. See Emails API. The legacy /v1/compose endpoint has been removed.

Rate limits

Each authenticated request is logged. Monitor at API usage.

Plan enforcement

API operations respect organization plan limits. Exceeding a limit returns 403 with a descriptive message:
  • max_accounts, max_contacts, max_templates
  • max_campaigns_per_month, monthly_email_quota
  • allow_automation, allow_google_sheet_sync
Upgrade at Billing.

Code examples

All endpoint pages include copy-paste cURL examples. Replace:

Related topics

Introduction