Remove a step

Remove one step by its position. The last remaining step of a template cannot be removed. Pass tract as a query parameter when the template has more than one.

DELETEhttps://app.trygtm.com/api/v1/templates/{template}/steps/{position}
Scope
write

Path parameters

templatestringrequired
The template, by id or exact name (case-insensitive).
positionintegerrequired
The step's position within its tract, counting from 1.

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

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.

Request

curl -X DELETE https://app.trygtm.com/api/v1/templates/Logistics%20opener/steps/1 \
  -H "Authorization: Bearer $TRYGTM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Response

{
  "data": {
    "detail": "Removed step 2 from “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": {}
      }
    ]
  }
}

Was this page helpful?