On this page

PATCH/templates/:templateId

Credits: 0
Rate limit: 30 / minute (shared control bucket)


Purpose

Update a manual outreach agent with an echo-all body: send the full writable messaging set every time. Sparse PATCH that omits prompt (or any other required field) is rejected.

Full Auto templates cannot be updated here. Agent knowledge / assets are rejected.

Empty selectedAccounts is rejected with 400 — clearing all accounts never silently deletes the agent.

Do not blind-echo GET into PATCH

GET /templates/:id returns followUps[].delay as a number (milliseconds or product-normalized value). PATCH requires each follow-up delay as an object:

{ "value": 2, "unit": "days" }

Rebuild followUps (and any other write fields) to the write schema below — copying the GET JSON body as-is will fail validation.


Request

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

Side effects

ChangeEffect
sendWhen changesCampaigns using this agent re-evaluate their send window
RenameAssigned campaigns show the new agent name
Switch to auto sendReview-awaiting drafts are released for send
Remove some accountsIn-progress campaigns pause; queued sends for removed accounts are cleared

Required body (echo-all)

name, prompt, yourPitch, messageType, sendWhen, selectedAccounts (≥1), outboundSendMode, skipExistingFirstDegree, agentCanReply, followUps (max 10), connectionInviteNoteEnabled, connectionInviteNoteMode, connectionInviteNote.

Each followUps[] item needs delay: { value, unit } (plus the follow-up’s messageType / prompt as applicable).


Response 200

Same allowlisted shape as GET /templates/:id.


Errors

CodeWhen
validation_errorMissing echo-all fields, empty accounts, Full Auto, invalid sendWhen
account_disconnectedA selected account is inactive or not connected (403)
not_foundUnknown template id

MCP

Tool: update_template.