Create a template block

Create an ai block (written per recipient from a prompt) or a static block (the same text for everyone).

POSThttps://app.trygtm.com/api/v1/blocks
Scope
write
MCP tool
create_block

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 block's name. Steps cite it as [[name]], so keep it readable.
modestringrequired
ai: the drafter writes this part per recipient from the prompt. static: the same text for everyone.aistatic
promptstringoptional
For an ai block, what to write. May reference the listed source fields.
bodystringoptional
For a static block, the exact words.
source_refsstring[]optional
The typed fields an ai block's prompt may draw on. The drafter refuses any other.Account: NameAccount: DomainAccount: NotesRecipient: First NameRecipient: TitleRecipient: Notes

Request

curl -X POST https://app.trygtm.com/api/v1/blocks \
  -H "Authorization: Bearer $TRYGTM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q4 logistics leaders",
    "mode": "ai"
  }'

Response

{
  "data": {
    "detail": "Block “Milestone opener” created. Cite it in a step's guidance as [[Milestone opener]].",
    "block": {
      "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
      "name": "Milestone opener"
    }
  }
}

Was this page helpful?