Page cover

FAQ

Find answers to some frequently asked questions about using the MTA API.

Ensure you are authenticated before making the below example requests to the Mobile Text Alerts 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"}'

See Send a Message to learn more.

Can the MTA API be used to send 2FA/MFA verification codes?

Yes, the Mobile Text Alerts SMS Verification API provides an easy way to manage SMS multi-factor authentication workflows within your application. There are endpoints for verification code generation, delivery of SMS messages and validation of user supplied codes. See Generate and validate 2FA / MFA codes via SMS to learn more.

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 message

  • totalSent- the total number of recipients of the message

  • totalFailedInternationalRecipients- the total number of failed recipients with non-US phone numbers.

  • message- a summary of request results

See How to build a sample request to the API to learn more about the request and response data for the /send endpoint.

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"}'

Visit Schedule Message Sends to learn more.

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",
    	    }
	}
}

Visit Properties field for custom variables in messages to learn more.

How can I be notified when my subscribers reply to a message?

In order to receive message reply notifications, you must configure a message-reply webhook. Once configured, when MTA receives an an inbound message from a provider will post the inbound message to this endpoint.

See Receive and Reply to Messages to learn more.

How can I import all of my subscribers?

Subscribers can be added with the Create Subscriber API Endpoint but for large imports the Bulk Create Subscribers endpoint is recommended to save on request round trip time and overall API call volume to avoid hitting rate limits.

How can I see the status of a sent message?

You can check the delivery status of your message sends with Mobile Text Alerts two different ways:

  • Call the List Deliveries API endpoint

    • This is best for reporting/analytics of settled message data. This only includes the most recent status for a message.

  • Configure the delivery-status webhook

    • This is best for real time status updates, with this webhook you can receive the full status history from the moment of send to the final result status (delivered, rejected etc.).

Can I send iMessages to my subscribers?

Yes, if you're interested in sending iMessages and want to participate in our beta program, please reach out to your account manager to notify them of your interest.

See Send an iMessage to learn more.

Last updated

Was this helpful?