Send the hotel’s email from your own code.

One HTTPS request with a JSON body. The API checks it, answers with a receipt in about fifty milliseconds, hands the message to the mail system and keeps its status for you.

You need a token from Madagascar Pet Hotel. How tokens work

Your request

POST /v1/messages HTTP/1.1
Host: email.madagascarhotelags.com
Authorization: Bearer ems_k2q7…
Content-Type: application/json
Idempotency-Key: booking-4821

{
  "to": ["guest@example.com"],
  "subject": "Your stay is confirmed",
  "text": "Luna checks in on Friday at 10:00."
}

The receipt

HTTP/1.1 202 Accepted
Location: /v1/messages/msg_01k6qz…

{ "id": "msg_01k6qz…", "status": "queued",
  "created_at": "2026-10-01T15:04:05.000Z" }

How a message travels

Sending is asynchronous. The API accepts your message and answers at once; a separate delivery worker hands it to the mail system. You can ask where it is at any moment.

  1. Accepted

    The token, its limits, the sender and every field are checked. You get 202 and a message id.

    26 to 117 ms of server time in our measurements
  2. Queued

    The message waits for the delivery worker, which picks it up within about a second.

    Status queued
  3. Sent

    The worker hands it to the mail system and records the result. Temporary failures are retried for about seven hours.

    Hand-off took 0.6 to 0.8 s
  4. Delivered

    The recipient's mail server takes it from there. Delivery reports are not exposed yet, so the delivery field stays empty for now.

    Coming in a later release

What you can count on

The rules are few and they do not change without notice. Each one links to the page that explains it.

Retries never send twice
Repeat a request with the same Idempotency-Key and you get the first answer back. Retries and idempotency
Errors you can act on
Every refusal has an HTTP status, a stable code and, for limits, a Retry-After. All error codes
Tokens the hotel controls
A token can be limited, given an expiry, rotated or blocked, and the change applies to the very next request. Tokens
Only approved senders
Mail leaves from addresses the hotel has approved, and people who unsubscribed or bounced are skipped automatically. Sending email
A status you can check
GET /v1/messages/{id} says exactly where a message is, with the reason if it failed. Message status
Light and close to you
Requests are answered on Cloudflare's network; checking one takes 1.5 ms of computing time at the median. Speed and latency