tanqoryExtMessagingMessage
- Query
- Other operations
One message (a campaign or an automation step).
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
id | ID! | Required |
Returns
| Field | Type | Description |
|---|---|---|
audienceSegmentId | ID | A campaign's recipients: the subscribers in this customer segment (gid://tanqory/Segment/…); null = every email subscriber. |
audienceSegmentName | String | The segment's name; null with no segment (or one deleted since). |
automation | TanqoryExtMessagingAutomation | The automation this message is a step of; null for a campaign. |
body | String! | The plain text: an SMS or WhatsApp message, or the text of an email's design (the email itself is rendered from |
channel | TanqoryExtMessagingChannel! | |
createdAt | DateTime! | |
design | JSON | An email's visual design (Apps > Messaging email editor): {version, colors, header, sections, footer}, the shape tanqoryExtMessagingEmailPreview takes. A message written before the editor gets the design its body stands for. Null for SMS, WhatsApp and "Code your own" HTML. |
id | ID! | |
previewText | String! | |
scheduledAt | DateTime | |
sendIf | String | An automation step sent only when this holds, else skipped: NO_ORDER_SINCE_TRIGGER (no order since the trigger). Null: always. |
sendStartedAt | DateTime | When the campaign started going out. |
sentAt | DateTime | When its last recipient was handled. |
shortenLinks | Boolean! | SMS: shorten links when it is sent ("Shorten links"). |
status | TanqoryExtMessagingMessageStatus! | |
subject | String! | The subject line (email) or the message name (SMS / WhatsApp). |
templateKey | String | The template it started from; null when written from scratch. |
unfinishedSections | [TanqoryExtMessagingUnfinishedSection!]! | The sections of its email that keep it from being sent, scheduled, tested or turned on (a placeholder, or a link to a store page that was deleted or is not published), in order; empty when it can go, and for SMS, WhatsApp and "Code your own". |
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 TanqoryExtMessagingMessage($id: ID!) {\n tanqoryExtMessagingMessage(id: $id) {\n audienceSegmentId\n audienceSegmentName\n automation { id }\n body\n channel\n createdAt\n design\n id\n previewText\n scheduledAt\n }\n}","variables":{"id":"gid://tanqory/Type/id"}}'// Node.js 18 or later (fetch is built in). Save as request.mjs and run: node request.mjs
const query = `query TanqoryExtMessagingMessage(\$id: ID!) {
tanqoryExtMessagingMessage(id: \$id) {
audienceSegmentId
audienceSegmentName
automation { id }
body
channel
createdAt
design
id
previewText
scheduledAt
}
}`;
const variables = {
"id": "gid://tanqory/Type/id"
};
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 TanqoryExtMessagingMessage($id: ID!) {
tanqoryExtMessagingMessage(id: $id) {
audienceSegmentId
audienceSegmentName
automation { id }
body
channel
createdAt
design
id
previewText
scheduledAt
}
}"""
variables = json.loads("""{
"id": "gid://tanqory/Type/id"
}""")
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))