Admin Emails

Render a lifecycle email without sending it

Returns the subject, preheader, HTML and plain-text bodies exactly as they would be sent, for a context you supply. Nothing is sent and nothing is recorded.

post/stats/admin-emails/preview

Request

  • Base URL: https://api.nippy.host
  • URL: https://api.nippy.host/stats/admin-emails/preview
  • Auth: bearer (a scheme the document does not define)

Request body

template'welcome' | 'agent_welcome' | 'unblock' | 'update_lesson' | 'trial_tips' | 'activation_ask' | 'paid_activation' | 'first_visitors' | 'preview_expiring' | 'payment_failed' | 'plan_ended_unpaid' required

Which lifecycle template to render. Retired keys are rejected — they have no template function.

Example request

{
  "template": "welcome",
  "context": {
    "productUrl": "https://nippy.host",
    "siteId": "11111111-1111-4111-8111-111111111111",
    "siteContent": "pdf",
    "siteUrl": "https://ada.nippy.site",
    "siteHost": "ada.nippy.site",
    "planName": "Pro",
    "viewCount": 14,
    "activityFrom": "14 September",
    "activityTo": "14 October",
    "previewHost": "brave-otter-4f2.preview.nippy.site",
    "previewUrl": "https://brave-otter-4f2.preview.nippy.site",
    "chargeAmount": "$8",
    "invoiceUrl": "https://invoice.stripe.com/i/acct_sample/test_sample",
    "sitesAffected": 2,
    "unsubscribeUrl": "https://api.nippy.host/lifecycle/unsubscribe?uid=…&sig=sample-signature",
    "companyName": "Nippy",
    "companyAddress": "1 Example Street, London"
  }
}

Response

template'welcome' | 'agent_welcome' | 'unblock' | 'make_it_yours' | 'update_lesson' | 'trial_tips' | 'trial_ending' | 'activation_ask' | 'feedback_ask' | 'week_one_upsell' | 'paid_activation' | 'first_visitors' | 'preview_expiring' | 'payment_failed' | 'plan_ended_unpaid' required
subjectstring required
preheaderstring required

The client's preview snippet, shown right after the subject line.

htmlstring required

Complete HTML document, exactly as sent.

textstring required

Plain-text alternative, exactly as sent.

stream'broadcast' | 'transactional' required
fromstring required

Sender this template goes out from — the founder-voice lifecycle address.

contextobject required

The full context used for this render, after overrides were layered over the sample defaults.

Example response

{
  "template": "welcome",
  "subject": "You're all set — one thing you might not know",
  "preheader": "Your URL is permanent. The files behind it are not.",
  "stream": "broadcast",
  "from": "Jamie @ Nippy <jamie@nippy.host>"
}

Changes

No recorded changes to this operation across all 1 revision of this API.