Skip to main content
Uses a multi-model pipeline (planner, draft, judge) to generate a reply. The draft incorporates thread context, knowledge base entries, SDR profile preferences, and follow-up rules.
curl -X POST https://app.leadterra.co/v1/sdr/drafts/generate \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "threadId": "THREAD_ID",
    "variantCount": 1
  }'

Request Body

threadId
string
required
The prospect thread to generate a draft for.
instructions
string
Optional guidance for tone, content, or approach.
variantCount
number
Number of draft variants (1–3, default 1).

Response

{
  "data": {
    "drafts": [
      {
        "id": "draft_id",
        "bodyText": "Hi Ava, thanks for the reply...",
        "bodyHtml": "<p>Hi Ava, thanks for the reply...</p>",
        "subject": "Re: Quick question"
      }
    ],
    "insights": [
      {
        "draftId": "draft_id",
        "approach": "Direct response",
        "confidence": 0.85,
        "rationale": "Prospect asked about pricing"
      }
    ],
    "appliedRules": []
  }
}