Skip to main content
POST
/
v1
/
emails
/
previews
Create Email Preview
curl --request POST \
  --url https://api.migma.ai/v1/emails/previews \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "html": "<string>",
  "subject": "Email Preview",
  "devices": [
    "<string>"
  ],
  "name": "<string>"
}
'
{
  "success": true,
  "data": {
    "previewId": "<string>",
    "status": "processing",
    "name": "<string>",
    "subject": "<string>",
    "devices": [
      "<string>"
    ],
    "metadata": {
      "requestedDevices": 123,
      "completedDevices": 123,
      "failedDevices": 123,
      "estimatedCompletionTime": 123
    }
  }
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. Use 'Authorization: Bearer ' where the JWT token is obtained from the login endpoint.

Body

application/json
html
string
required

Email HTML content to preview

subject
string
default:Email Preview

Email subject line (for display purposes)

devices
string[]

Specific devices to render on (optional, defaults to 10 common devices)

name
string

Custom name for the preview

Response

Preview creation started

success
boolean
data
object