Menu

Expand
Rate this page:

Send Outbound Messages via SMS and WhatsApp

This Twilio product is currently available as a Beta release. Some features are not yet implemented and others may be changed before the product is declared as Generally Available. Use of this Beta release is subject to the relevant terms of the applicable license agreement. Beta products are not covered by a Twilio SLA. Learn more about beta product support.

Flex Conversations requires Flex UI 2.0. If you are on Flex UI 1.x, please refer to Messaging in Flex pages.

Flex Conversations currently does not support displaying the customer's WhatsApp Profile Name.

You can use the /Interactions endpoint to implement additional opportunities for agents to send an outbound SMS, WhatsApp, Chat, or Email.

Some practical examples include a “click-to-sms” or “click-to-email” functionality in your CRM integration.

Parameters in REST API format
channel
Required
post object Not PII

The Interaction's channel.

routing
Required
post object Not PII

The Interaction's routing logic.

On your outbound request, you must set the initiated_by property to "agent". Also, there are specific field requirements depending on your channel type. See Interactions resource request parameters for the different properties you can set.

        
        
        

        Outbound WhatsApp

        Please note, creating outbound WhatsApp interactions is very similar to outbound SMS. However, you will need to create outbound templates in order for an agent to initiate contact.

              
              
              

              Once your interaction is created, grab the conversation SID (prefixed by CH) and pass it as a parameter when you create a conversation message.

              curl -X POST https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages \
              --data-urlencode "Author=agentname" \
              --data-urlencode "Body=Hello world" \
              -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
              Rate this page:

              Need some help?

              We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                    
                    
                    

                    Thank you for your feedback!

                    Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                    Sending your feedback...
                    🎉 Thank you for your feedback!
                    Something went wrong. Please try again.

                    Thanks for your feedback!

                    thanks-feedback-gif