On this page

PATCH/templates/:id

Echo-all update of a manual email agent. GET the agent, change what you need, and PATCH the full writable set. A sparse body is rejected (400) so a typo cannot blank a field.

0 credits. Rate class: campaign_control (default 20/min).

Request

PATCH /templates/tpl_abc
X-API-Key: sk_live_...
Content-Type: application/json

Every key below is required (shapes as in POST /templates):

name, prompt, yourPitch, messageType, sendWhen, selectedAccounts, outboundSendMode, agentCanReply, agentMaxReplies, followUps, emailSubjectType, emailSubjectTemplate, emailSubjectPrompt, signatureBlock, useGmailAccountSignature, messageBodyFormat, autoExcludePolicy

  • selectedAccounts must stay non-empty and connected.
  • Full Auto agents → 400 — edit them in the dashboard.
  • Follow-ups are replaced wholesale by the array you send.

Side effects

  • Changing sendWhen or outboundSendMode resets dispatch timing on campaigns using the agent.
  • Renaming syncs the assigned template name on those campaigns.
  • Removing an account from selectedAccounts releases queued leads that were bound to it.
  • Changing subject/body configuration invalidates pending drafts.

Response

Refreshed GET /templates/:id detail.

Errors

CodeWhen
validation_errorMissing echo-all field, bad value, Full Auto, rejected key
account_disconnectedA selected account is inactive or disconnected
not_foundUnknown template id
rate_limitedcampaign_control RPM exceeded
upstream_unavailableWrite failed — retry

MCP

Tool: update_template. Always call get_template first.