HTML Newsletters

Send rich mobile newsletters with content_type=html. Users open the complete HTML in a WebView reader from the partner message list.

Send

POST /api/v1/messages

{
  "phone": "+228XXXXXXXX",
  "content_type": "html",
  "subject": "SEED Actu · Image & vidéo",
  "priority": "notification",
  "html": "<div style=\"font-family:sans-serif\"><h1>Bonjour</h1><p>…</p><img src=\"https://…/photo.jpg\" style=\"max-width:100%\"/><video controls src=\"https://…/clip.mp4\" style=\"max-width:100%\"></video></div>"
}

Fields

FieldDescription
htmlComplete HTML fragment or document
subjectTitle shown in the hub list
previewOptional plain-text teaser (extracted from HTML when omitted)
bodyAlternative to html when content_type=html

Response body (list title)

The API response's body is the subject / preview, not raw HTML. The full markup is stored in the payload and exposed to clients as follows:

{
  "content_type": "html",
  "body": "SEED Actu · Image & vidéo",
  "html": {
    "html": "<div>…</div>",
    "subject": "SEED Actu · Image & vidéo",
    "preview": "Bonjour Découvrez…"
  }
}

Client behavior

SurfaceBehavior
Hub list (default)Title row; tap opens the full reader
Search resultsRich preview card; tap opens the full reader
Chat bubbleCompact “Newsletter” row; opens the full reader

Best practices

  • Inline critical CSS. Many clients strip <style> from partial HTML; MorisBox wraps fragments with a safe default style sheet
  • Responsive images: max-width:100%; height:auto
  • Prefer hosted video URLs and include a poster image
  • Provide a clear CTA link (https://…)
  • Keep payload size reasonable (under approximately 200 KB of HTML)

Image and video example

See the quickstart, or send:

curl -X POST "$API/messages" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d @newsletter.json

Here, newsletter.json includes content_type: "html", subject, and html with <img> and <video> tags.