Mailchimp Developer LogoMailchimp Developer Wordmark

Send Your First Transactional SMS

At a glance

This guide will walk you through the essentials of sending your first SMS message using the Mailchimp Transactional API. We'll cover how to set up your account, obtain a phone number, and use the API to send a text message. This will ensure you have everything configured correctly to start sending transactional SMS messages to your customers.

What you'll need

  • A Standard or higher Mailchimp account with Transactional enabled and SMS credits

  • A phone number approved for sending SMS

  • Your API key

Create an account

If you don't have a Mailchimp Transactional account, you’ll need to create a Mailchimp account and enable Transactional. 

If you have a Mailchimp Standard plan or higher, you can enable Mailchimp Transactional from the Monthly plans or credits page of your account

You can submit an SMS marketing application, and purchase SMS credits from the SMS overview page, the SMS settings page, or the SMS editor in Mailchimp. Transactional SMS messages may be sent from programs tied to your account.

Setup your API key

To find out how to create an API key and make your first API call, see the Transactional API Quick Start guide.

Send your first SMS

With everything set up, we can start sending SMS messages.

Using the send-sms API endpoint, the minimum required fields to make an SMS send are:

  • key (string field): valid Mailchimp Transactional API key

  • message (object field): body of the message that must include the following parameters:

    • to (string field): valid phone # of recipient. Required format: E.164

    • from (string field): valid phone # of approved SMS program. Required format: alphanumeric. Must be one of three: 1) E.164 phone number, 2) short code, 3) alphanumeric sender string in EU

    • text (string field): SMS content to be sent

    • consent (string field): consent type for the message. Possible values: "onetime", "recurring", or "recurring-no-confirm"

An example SMS send may look like this:

Send your first SMS

Bash
MESSAGE='{"key": "$YOUR_API_KEY","message": {"sms": {"text": "Hello from Mandrill SMS! Visit https://example.com for more info.","to": "+0000000000", "from": "+0000000000", "consent": "onetime","track_clicks": true}}}' 
  
curl -X POST https://mandrillapp.com/api/1.1/messages/send-sms \
  -H "Content-Type: application/json" \
  -d "$MESSAGE"

For more information about this endpoint and accepted parameters, review the API reference documentation.