Získání těla e-mailu

const response = await fetch('https://api.emailit.com/v2/emails/em_abc123xyz789def456/body', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer em_test_51RxCWJ...vS00p61e0qRE',
    'Content-Type': 'application/json'
  }
});

const result = await response.json();

Odpovědi

{
  "text": "Textový obsah e-mailu v prostém textu",
  "html": "<html><body><h1>Vítejte!</h1><p>HTML obsah e-mailu</p></body></html>"
}