FAQ
Find answers to some frequently asked questions about using the MTA API.
How can I send a single “Hello World” message to myself?
You can send a message to your personal phone number for testing and verification. To do this you would send a request to the /send
endpoint with the phone number in the subscribers
field and the test message in the message
field.
Example request:
curl --location 'https://api.mobile-text-alerts.com/v3/send' \
--data '{"subscribers": [1112223333],"message": "Hello World"}'
What information is available in response to an API call to send a message?
A successful request will provide the following information in the response:
messageId
- the unique id of the messagetotalSent
- the total number of recipients of the messagetotalFailedInternationalRecipients
- the total number of failed recipients with non-US phone numbers.message
- a summary of request results
How do I schedule a message to be sent in the future?
You can indicate the time a message will be sent by including the scheduledDate
request field when calling the /send
endpoint. This allows you to use ISO8601 format to indicate the exact date and time a message is sent.
Enter the time to send the message in the scheduledDate
field as part of the request.
Example request:
curl --location 'https://api.mobile-text-alerts.com/v3/send' \
--data '{"subscribers": [1112223333],"message": "Hello World", "scheduledDate": "20260302T173000-0500"}'
Can I refer to my subscribers by name in the message I send to them?
Yes, you can refer to subscribers by name in your message by using a Liquid Template variable in the properties
field. The properties
field contains a map between the individual subscribers and the values of these variables assigned to them.
In the below example request, the firstName
variable is used to reference the name values for the recipients. The name of each recipient is defined in properties for each subscriber number.
Example request:
{
"subscribers": ["3175551111", "3175552222"],
"message": "Hello {{firstName}}!",
"properties": {
"3175551111": {
"firstName": "Bob",
},
"3175552222": {
"firstName": "Tony",
}
}
}
Last updated
Was this helpful?