POST/templates
Credits: 0
Rate limit: 30 / minute (shared control bucket)
Idempotency: Idempotency-Key → POST:/templates
Purpose
Create a manual outreach agent. Always stores mode: 'manual'. Does not auto-assign to campaigns (use POST /campaigns/:id/template).
Full Auto, agent knowledge, assets, and skillIds are rejected. Empty yourPitch is rejected (dashboard may synthesize pitch; public API does not).
Request
POST /templates
X-API-Key: sk_live_...
Content-Type: application/json
Idempotency-Key: optional-uuid
Required body
| Field | Notes |
|---|---|
name | Non-empty string |
prompt | Non-empty string (static text or AI instruction) |
yourPitch | Non-empty trimmed string |
sendWhen | IANA timezone, days[] as lowercase full names (monday…sunday), timeRange.start / end as HH:MM |
selectedAccounts | ≥1 connected / working account ids |
Optional body
messageType (static | ai), outboundSendMode (auto | review), skipExistingFirstDegree, agentCanReply, followUps (max 10), connectionInviteNoteEnabled, connectionInviteNoteMode, connectionInviteNote.
Each followUps[] item must use write-shaped delay:
{ "delay": { "value": 2, "unit": "days" }, "messageType": "static", "prompt": "…" }
unit is one of minutes | hours | days. Do not send GET’s numeric delay here.
Response 201
Same allowlisted shape as GET /templates/:id (note: GET returns followUps[].delay as a number — different from the write shape above).
Errors
| Code | When |
|---|---|
validation_error | Missing/invalid fields, empty selectedAccounts, invite-note rules |
account_disconnected | A selected account is inactive or not connected (403) |
conflict | Idempotency mismatch / in progress |
MCP
Tool: create_template — optional idempotencyKey.