Create a template
Create a template, blank or from a library entry. No model call and no credits; use POST /templates/generate to have the copy agent write the chain from a brief.
POST
https://app.trygtm.com/api/v1/templates- Scope
write- MCP tool
- create_template
Headers
Idempotency-Keystringoptional- A key unique to this write, up to 255 characters. A retry carrying the same key returns the first response instead of running again. Kept for 24 hours.
Body
namestringrequired- The template's name. Unique within the workspace.
goalstringoptional- What the sequence is for. Defaults to start_conversation, as on the screen.
start_conversationbook_meetingbook_demoevent_signupnurturereengage channelstring | nulloptional- A label for the template's main channel. Omit or null for any channel; a library entry supplies its own. The steps decide what actually runs.
emaillinkedinsms librarystringoptional- A library entry's key to copy the steps from. Omit for a blank template.
Request
curl -X POST https://app.trygtm.com/api/v1/templates \
-H "Authorization: Bearer $TRYGTM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Q4 logistics leaders"
}'Response
{
"data": {
"detail": "Template “Logistics opener” created blank. It runs the default chain for its goal until steps are added.",
"template": {
"id": "c1d2e3f4-0a1b-4c2d-8e3f-4a5b6c7d8e9f",
"name": "Logistics opener"
},
"steps": []
}
}