On this page

POST/templates

Create a manual email agent. The Public API never creates Full Auto agents. Creating an agent does not assign it to a campaign — call POST /campaigns/:id/template.

0 credits. Rate class: campaign_control (default 20/min). Optional Idempotency-Key (max 128).

Request

POST /templates
X-API-Key: sk_live_...
Content-Type: application/json
Idempotency-Key: demo-template-1
{
  "name": "Local SEO outreach",
  "prompt": "Write a short intro about our SEO audit for {companyName}.",
  "yourPitch": "We run free local SEO audits for restaurants.",
  "sendWhen": {
    "days": ["monday", "tuesday", "wednesday"],
    "timeRange": { "start": "09:00", "end": "17:00" },
    "timezone": "Europe/Paris"
  },
  "selectedAccounts": ["acc_1"]
}
FieldRequiredNotes
nameYes≤ 200 chars
promptYesInitial body (static) or AI instruction (ai)
yourPitchYesNon-empty
sendWhenYesWeekday names, HH:MM timeRange, IANA timezone
selectedAccountsYes≥ 1 connected sending account id
messageTypeNoai (default) · static
outboundSendModeNoauto (default) · review
agentCanReplyNoboolean, default false
agentMaxRepliesNo1…3, default 3
followUpsNo≤ 10 items with delay + messageType + prompt
Subject / signature / formatNoemailSubjectType, templates, signatureBlock, useGmailAccountSignature, messageBodyFormat
autoExcludePolicyNo{ "mode": "standard|custom|off", "customRules" }

Rejected fields include mode, knowledge/assets/skills, campaign assignment keys, LinkedIn invite-note fields, and unknown keys.

Response 201

Same shape as GET /templates/:id.

Errors

CodeWhen
validation_errorMissing/invalid field or rejected key
account_disconnectedA selected account is missing, inactive, or disconnected
conflictIdempotency mismatch or in progress
rate_limitedcampaign_control RPM exceeded
upstream_unavailableWrite failed — retry with the same Idempotency-Key

MCP

Tool: create_template. Prefer an Idempotency-Key.