3e4029d19684
Preview message
<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Messages%3A%20Send%0A/getMessagePreview" target="_blank">Try in sandbox</a><br>Get a messages preview (with dynamic fields merged) of up to 100 messages per session.
Query parameters
Message text. Required if template_id is not set.
Template used instead of message text. Required if text is not set.
DEPRECATED, consider using sendingDateTime and sendingTimezone parameters instead: Optional (required with rrule set). Message sending time is in unix timestamp format. Default is now.
Sending time is in Y-m-d H:i:s format (e.g. 2016-05-27 13:02:33). This time is relative to the sendingTimezone.
The ID or ISO-name of the timezone used for sending when the sendingDateTime parameter is set, e.g. if you specify sendingDateTime = "2016-05-27 13:02:33" and sendingTimezone = "America/Buenos_Aires", your message will be sent on May 27, 2016 13:02:33 Buenos Aires time, or 16:02:33 UTC. Default is the account timezone.
Comma-separated array of contact resources id message will be sent to.
Comma-separated array of list resources id message will be sent to.
Comma-separated array of E.164 phone numbers message will be sent to.
Should sending method cut extra characters which not fit supplied partsCount or return 400 Bad request response instead.
Maximum message parts count (Textmagic allows sending of 1 to 6 message parts).
Custom message reference id which can be used in your application infrastructure.
One of the allowed Sender ID (phone number or alphanumeric sender ID). If the specified Sender ID is not allowed for some destinations, a fallback default Sender ID will be used to ensure delivery. See Get timezones.
An iCal RRULE parameter to create recurrent scheduled messages. When used, sendingTime is mandatory as the start point of sending. See https://www.textmagic.com/free-tools/rrule-generator for format details.
Should the sending method try to create new Chat(if not exist) with specified recipients?
Send Text-to-Speech message.
Treat phone numbers passed in the 'phones' field as local.
The 2-letter ISO country code for local phone numbers, used when 'local' is set to true. Default is the account country.
Response
Returned when successful.
Example response
{
"messages": [
{
"id": 4991,
"text": "I love Textmagic!",
"status": "d",
"rejectReason": "a",
"contactId": 2764,
"sessionId": 3122,
"messageTime": "2019-08-12T11:43:37+0000",
"avatar": "avatars/dummy_avatar.png",
"deliveredAt": "2026-05-18T19:25:45+0000",
"charset": "ISO-8859-1",
"charsetLabel": "ISO-8859-1",
"firstName": "John",
"lastName": "Conway",
"country": "US",
"phone": "447624800500",
"price": 0.025,
"partsCount": 6,
"fromEmail": "test@email.com",
"fromNumber": "447624800500"
}
]
}