Add a step
Append a step to the end of a tract. The action decides the channel. Authoring a step contacts nobody: the launcher performs it later, inside the send window and behind the gate.
POST
https://app.trygtm.com/api/v1/templates/{template}/steps- Scope
write- MCP tool
- add_template_step
Path parameters
templatestringrequired- The template, by id or exact name (case-insensitive).
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
actionstringrequired- What the step does, given as the action id or as the label the builder shows. linkedin.connection_request = "Send Connection Request" (message; no settings) | linkedin.message = "Send Message" (message; settings: writing) | linkedin.perform_action = "Perform Action" (interaction; settings: verb) | linkedin.inmail = "Send InMail" (message; settings: writing, subject) | linkedin.comment = "Post AI Comment" (message; no settings) | linkedin.event_invite = "Send Invite to Event" (interaction; settings: eventId) | email.send = "Send Email" (message; settings: writing, subject) | sms.send = "Send SMS" (message; settings: writing) | data.enrich_profile = "Enrich Profile" (internal; no settings) | crm.push = "Push to CRM" (internal; no settings) | webhook.send = "Send Webhook" (internal; settings: note) | label.add = "Add Label" (internal; settings: label) | label.remove = "Remove Label" (internal; settings: label)
tractstringoptional- Which parallel tract the step is in, by the name the builder shows. Omit when the template has one tract; required when it has more.
labelstringoptional- The step's display name. Defaults to the action's own name.
wait_amountintegeroptional- How long to wait before this step, measured from the previous step landing. 0 to 365.
wait_unitstringoptional- The unit waitAmount is in.
hoursdaysbusiness_days branch_conditionstring | nulloptional- The event this step waits behind. Cold email starts unconditionally; the first LinkedIn step waits for engaged, and a later LinkedIn message waits for request_accepted. Null is unconditional.
engagedrequest_accepted bodystring | nulloptional- The step's body. By default it is writing guidance used to personalize each recipient's message at draft time, not literal delivery copy; report it as saved guidance. With settings.writing "template" it is the message itself, sent as written: {{first_name}}-style variables are filled from each lead and only the {{ai.*}} parts are written per lead; report it as a saved template. For exact copy on one message, edit that draft through the inbox tool.
settingsobjectoptional- Per-action settings, validated against the chosen action's own schema, laid over the step's own: give only what changes. Changing the action resets them, except that a template carries over to another message step. Email, LinkedIn message, InMail and SMS steps take writing ("guidance" or "template"). An email template's subject line is settings.subject and may use variables and {{ai.subject}}; an email guidance step's subject is written with its body. InMail's own subject setting is separate from templates.
Request
curl -X POST https://app.trygtm.com/api/v1/templates/Logistics%20opener/steps \
-H "Authorization: Bearer $TRYGTM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"action": "send_email"
}'Response
{
"data": {
"detail": "Added step 2, “Follow-up”, to “Logistics opener”.",
"template": {
"id": "c1d2e3f4-0a1b-4c2d-8e3f-4a5b6c7d8e9f",
"name": "Logistics opener",
"goal": "book_meeting"
},
"steps": [
{
"position": 1,
"tract": "campaign-email",
"action": "send_email",
"channel": "email",
"label": "Opener",
"wait_amount": 0,
"wait_unit": "days",
"branch_condition": null,
"body": null,
"settings": {}
}
]
}
}