Ask for changes to a sent message
Say in plain words how a message that already went out should have read. The message itself is not changed: the answer is a preview of how it should have read, anything the writer declined and why, and the lesson saved for the workspace. Every later message follows the lesson, and campaign drafts already written are rewritten to follow it just before they send. A message that has not gone out answers 409; use /messages/{message_id}/revise for a draft.
POST
https://app.trygtm.com/api/v1/messages/{message_id}/feedback- Scope
write- Cost
- 2 action credits per unit —
ai.message.standard - MCP tool
- revise_sent_message
Path parameters
message_idstringrequired- The message's id, from list_sent_messages.
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
instructionstringrequired- How messages like it should read, in the person's own words.
Request
curl -X POST https://app.trygtm.com/api/v1/messages/8f2a91c4-6d1e-4c0a-9a57-2f3b1c7e9d10/feedback \
-H "Authorization: Bearer $TRYGTM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"instruction": "…"
}'Response
{
"data": {
"id": "aa11bb22-cc33-4d44-8e55-ff6677889900",
"revision_id": "1e2f3a4b-5c6d-4e7f-8a9b-0c1d2e3f4a5b",
"preview": {
"subject": "your dispatch team",
"body": "Dana, saw Northbeam is hiring two dispatchers.\n\nWho covers the phones while they ramp up?"
},
"declined": null,
"lesson": {
"kind": "learned",
"id": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"text": "Keep every message under 40 words."
},
"note": "Saved for this workspace: \"Keep every message under 40 words.\" Every message from now on follows it, and drafts already written are rewritten to follow it before they send."
}
}