tanqoryExtMessagingTemplates
- Query
- Other operations
The store's saved templates, newest first (at most 250); channel narrows, query matches the name.
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
channel | TanqoryExtMessagingChannel | Optional | |
query | String | Optional |
Returns
[TanqoryExtMessagingTemplate!]! A saved template of the store (Apps > Messaging > Templates): content to start messages from.
| Field | Type | Description |
|---|---|---|
body | String! | |
channel | TanqoryExtMessagingChannel! | |
createdAt | DateTime! | |
design | JSON | An email template's visual design (as TanqoryExtMessagingMessage.design); null for SMS and WhatsApp. |
id | ID! | |
name | String! | |
previewText | String! | |
shortenLinks | Boolean! | SMS: shorten links when a message made from it is sent. |
subject | String! | The subject line (email) or the message name (SMS / WhatsApp) a message starts with; may be empty. |
unfinishedSections | [TanqoryExtMessagingUnfinishedSection!]! | The sections a message made from it would have to finish before sending (as TanqoryExtMessagingMessage.unfinishedSections). |
updatedAt | DateTime! |
Example request
A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.
Set STORE_ID and TANQORY_ACCESS_TOKEN in your environment first (Make your first API call).
curl -X POST "https://api.tanqory.com/admin/2026-10/stores/$STORE_ID/graphql" \
-H "Authorization: Bearer $TANQORY_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
--data '{"query":"query TanqoryExtMessagingTemplates {\n tanqoryExtMessagingTemplates {\n body\n channel\n createdAt\n design\n id\n name\n previewText\n shortenLinks\n subject\n updatedAt\n }\n}","variables":{}}'// Node.js 18 or later (fetch is built in). Save as request.mjs and run: node request.mjs
const query = `query TanqoryExtMessagingTemplates {
tanqoryExtMessagingTemplates {
body
channel
createdAt
design
id
name
previewText
shortenLinks
subject
updatedAt
}
}`;
const variables = {};
const res = await fetch(`https://api.tanqory.com/admin/2026-10/stores/${process.env.STORE_ID}/graphql`, {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + process.env.TANQORY_ACCESS_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({ query, variables }),
});
console.log(res.status, JSON.stringify(await res.json(), null, 2));# Python 3, standard library only. Save as request.py and run: python3 request.py
import json, os, urllib.request
query = """query TanqoryExtMessagingTemplates {
tanqoryExtMessagingTemplates {
body
channel
createdAt
design
id
name
previewText
shortenLinks
subject
updatedAt
}
}"""
variables = json.loads("""{}""")
req = urllib.request.Request(
"https://api.tanqory.com/admin/2026-10/stores/" + os.environ["STORE_ID"] + "/graphql",
data=json.dumps({"query": query, "variables": variables}).encode(),
headers={
"Authorization": "Bearer " + os.environ["TANQORY_ACCESS_TOKEN"],
"Content-Type": "application/json",
},
)
with urllib.request.urlopen(req) as res:
print(res.status, json.dumps(json.load(res), indent=2))