AppAutoGtm

Generate Email Templates

LLM-build the outreach brief for segment and persist it.

Lifted out of bridge.run_bridge so POST /projects returns in <1s instead of waiting on the 15-30s LLM round-trip. The frontend fires this endpoint as soon as the user picks a campaign in the onboarding wizard, so by the time they reach the template-editor sub-step the brief is already populated and email_templates_version > 0.

Idempotent: if the segment already carries non-empty instructions, the LLM call is skipped and the existing brief is returned. Failures (timeout, parse error) leave the row untouched (DEFAULT_TEMPLATES are NOT written — empty instructions would block the sender, same policy as the old bridge code).

post/api/app-auto-gtm/segments/{segment_id}/generate-email-templates

Path parameters

segment_idinteger required

Cookies

ex_accessstring nullable
ex_orgstring nullable

Response

Successful Response

namestring required

Short campaign / segment name (2-4 words)

painstring

Core pain this ICP has (max ~10 words)

use_casestring

What this ICP does with the product (max ~15 words)

keywordsstring

Comma-separated search keywords (5-8, lowercase, 1-3 words each)

positive_criteriasstring[]

Positive signals identifying this buyer (qualitative, 3-5 words each)

negative_criteriasstring[]

Disqualifying signals — look-alikes that are NOT a fit

example_clientsstring[]

Recognizable example companies that fit this ICP

decision_makerstring

Who to reach at the prospect, framed by responsibility

target_geostring

Target geographies — country names, comma-separated

target_company_sizestring

Target company size — free-text prompt, e.g. "mid-market and enterprise", "startups under 50"

idinteger required
descriptionstring required
contextstring
daily_limit_usdinteger required
pausedboolean
agent_turn_runningboolean
instructionsstring
followup_instructionsstring
languagestring
target_urlstring nullable
email_templatesobject
email_templates_versioninteger
updated_atstring
people_countinteger
report_frequencystring nullable

Changes

No recorded changes to this endpoint across all 2 revisions of this API.