Generate a draft
instructions to guide the tone or content.
Edit a draft
Send the draft
422 with a guardrails object explaining the issues.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Generate AI drafts, edit, and send replies through an SDR’s connected Gmail.
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}'
instructions to guide the tone or content.
{
"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": [],
"appliedRules": []
}
}
curl -X PATCH https://app.leadterra.co/v1/sdr/drafts/DRAFT_ID \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{"bodyText": "Hi Ava, thanks for getting back to me..."}'
curl -X POST https://app.leadterra.co/v1/sdr/drafts/DRAFT_ID/send \
-H "Authorization: Bearer sk_live_your_key"
422 with a guardrails object explaining the issues.
curl -X POST https://app.leadterra.co/v1/sdr/threads/THREAD_ID/send-manual \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{"bodyText": "Thanks for the note, I will follow up tomorrow."}'
curl -X POST https://app.leadterra.co/v1/sdr/drafts/DRAFT_ID/regenerate \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{"instructions": "Be more concise and mention the integration"}'
curl -X DELETE https://app.leadterra.co/v1/sdr/drafts/DRAFT_ID \
-H "Authorization: Bearer sk_live_your_key"