Skip to main content
POST
Node.js SDK

Authorizations

Authorization
string
header
required

API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where YOUR_API_KEY is obtained from the Migma dashboard under Settings → Developers → API Keys.

Body

application/json
projectId
string
required
Pattern: ^[0-9a-fA-F]{24}$
html
string

Single HTML or .eml source. Provide html or htmls, not both.

name
string

Filename for a single html paste.

Maximum string length: 200
htmls
object[]

Multiple HTML or .eml files. One file becomes one canvas slot.

Required array length: 1 - 12 elements
instruction
string

Natural-language conversion instruction (keep as-is vs apply brand).

Maximum string length: 20000
languages
string[]
Maximum array length: 5
visibility
enum<string>
default:unlisted
Available options:
private,
unlisted,
public
generateMedia
boolean

Generate AI media for missing images. Defaults to the project setting, then true.

Response

HTML import started

success
boolean
required
data
object
error
string | null