Skip to main content
POST
email.template.generate

Authorizations

Authorization
string
header
required

A Lath API key: lath_live_… or lath_test_… on a server, lath_live_pk… or lath_test_pk… in a browser.

Headers

Idempotency-Key
string

Replays the stored response for the same key and input; refuses different input.

Body

application/json
prompt
string
required

What the email should say, in plain language. When existing is given, what to change.

Required string length: 1 - 2000
kind
enum<string>

What sort of email this is; shapes the draft's structure.

Available options:
welcome,
receipt,
announcement,
reset,
digest,
other
tone
enum<string>

How it should sound.

Available options:
friendly,
professional,
direct,
warm
existing
object

A draft to refine, as returned by a previous call.

Response

{ activityId, result }. activityId is empty for reads.

activityId
string
required

The activity this call created, or empty for a read.

result
object
required
Last modified on September 23, 2026