MailLandDocs

Quickstart

Send your first email with Mail.Land in under 5 minutes

Prerequisites

  • A MailLand account (sign up)
  • A verified sending domain
  • An API key (credential)

Sandbox credentials still require a registered, verified sending domain. They never deliver to ordinary recipients: a sandbox send is accepted and logged, or delivered only to addresses on your sandbox allow list (Settings → Sandbox Allow List). New workspaces are limited to that allow list until verified.

Send Your First Email

Get your API key

After creating your account and workspace, open Credentials in the sidebar and create a new credential:

  • Product: Sending
  • Mode: Production (or Sandbox for testing)
  • Stream: Transactional
  • Channel: API

Copy the API key: it's shown only once. The key looks like this:

ml_pet_Ab3Kx9mN2pQ7rT4wL8yD...

The prefix encodes the credential type:

  • ml_: all MailLand keys start with this
  • p or s: Production or Sandbox mode
  • e, i, or v, Sending/Email, Inbound, or Validation product (Sending keys also carry a stream letter: et for transactional, em for marketing, e.g. ml_pet_...)

Send an email

Make a POST request to the send endpoint with your email details:

Send an email with curl
curl -X POST https://api.mail.land/v1/transactional/send \
  -H "X-API-Key: ml_pet_Ab3Kx9mN2pQ7rT4wL8yD..." \
  -H "Content-Type: application/json" \
  -d '{
    "from": {
      "email": "[email protected]",
      "name": "Your App"
    },
    "to": [
      {
        "email": "[email protected]",
        "name": "Jane Doe"
      }
    ],
    "subject": "Welcome to our platform",
    "htmlContent": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
    "textContent": "Welcome! Thanks for signing up."
  }'

Check the response

A successful response returns 202 Accepted with details about the queued email:

Response: 202 Accepted
{
  "success": true,
  "jobId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "messageIds": ["t_a1b2c3d4e5f6..."],
  "acceptedRecipients": ["[email protected]"],
  "rejectedRecipients": [],
  "queuedAt": "2026-02-17T10:30:00Z",
  "isSandboxed": false
}

Key fields:

  • jobId: unique identifier for tracking this send operation
  • messageIds: individual message IDs (prefixed t_ for transactional, m_ for marketing)
  • acceptedRecipients: emails that were accepted for delivery
  • rejectedRecipients: emails that were rejected (with reasons)
  • isSandboxed: true if the request used a sandbox credential: the email was logged but not sent, or sent only to allow-listed recipients

Common Errors

StatusError CodeMeaning
401UNAUTHORIZEDMissing, invalid, expired or revoked X-API-Key
422DOMAIN_NOT_VERIFIEDThe sender domain isn't verified
429RATE_LIMIT_EXCEEDEDToo many requests: check Retry-After header
429QUOTA_EXCEEDEDMonthly sending quota reached
429SENDING_BLOCKEDYour account's verification level doesn't allow this send yet: complete verification (marketing sends need business verification)
403SENDING_BLOCKEDSending is blocked outright for this account. Retrying does not help; contact support

All errors return a JSON body with code and message fields:

Error Response
{
  "code": "DOMAIN_NOT_VERIFIED",
  "message": "Domain is not verified",
  "timestamp": "2026-02-17T10:30:00Z",
  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
}

What's Next

On this page