Skip to main content
GET
/
v1
/
emails
/
{artifactId}
Node.js SDK
import Migma from 'migma';

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.emails.get('ARTIFACT_ID');
console.log(data.html);
{
  "success": true,
  "data": {
    "artifactId": "<string>",
    "conversationId": "<string>",
    "messageId": "<string>",
    "slotIdx": 123,
    "slotUuid": "<string>",
    "status": "<string>",
    "subject": "<string>",
    "preheader": "<string>",
    "html": "<string>",
    "templateVariables": [
      {}
    ],
    "warnings": [
      "<string>"
    ],
    "thumbnailUrl": "<string>",
    "updatedAt": "2023-11-07T05:31:56Z",
    "source": "<string>"
  },
  "error": "<string>"
}

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 → API Integration.

Path Parameters

artifactId
string
required

Email artifact ID returned in generation status result.emails[].artifactId or shown in Publish -> Send via API.

Pattern: ^[0-9a-fA-F]{24}$

Response

Email artifact retrieved

success
boolean
required
data
object
error
string | null