How to send SMS via API Blip Help November 21, 2022 17:25 Updated Index: SMS firing via API! SMS Channel Best Practices SMS firing via API! The process of sending SMS via API is quite simple. Follow the steps below to send your message: Before sending your message, pay attention to the number of characters and special characters in your message, since for each amount of message there is a type of charge. The text of an SMS can contain up to 160 characters, but by using special characters all the characters in the message will be counted differently and the message limit will be 70 instead of 160. Example of characters that are considered special: (ç, á, ã, etc.) So, since each SMS can only contain 160 characters, when we use a special character we must remember that it changes the character limit of the message. If you exceed this limit of 160 or 70, the messages will be sent, but you will be charged extra, because it is interpreted as sending more than one message. Attention: Due to the SMS sending protocol, when sending a message that exceeds the character limit of a message, sending multiple SMS consumes some characters of the message in order to unite the text at destination. That is, for a message with special character (limit 70 characters to count as 1 SMS) a 140-character text will not charge two messages but three, since sending the message will consume 3 characters from each part of the message. For sending a message with a 160 character limit, sending will consume 7 characters from each part of the message. Exemplo de limite de caracteres: Number of Characters Limit by Message Division Number of Messages 70 (including special character) 70 1 71 (including special character) 67 2 135 (including special character) 67 3 160 160 1 320 153 3 Examples of words and their number of characters due to the use of special characters, note that these characters are in bold: Word Message character limit Hello! 70 Hello 160 Warning! 70 Warning 160 Below is an example of sending a message with its number of characters and the number of messages due to the use of special characters. Message Number of characters Number of Messages Hello everyone! What's up with you guys? Attention, this is a test message for sending SMS. You have been awarded with R$ 10,000 reais in bonus access the instagram @testeDeMensagem and check it out! 193 3 Hello everybody, how are you? Attention this is a test message for sending SMS. You have been awarded with 10 thousand reais in bonus access the link and check. 147 1 (Table of characters considered as "not special") 1) Requests To send a trigger via API you need to access some HTTP request application, for example Postman . If you have not installed it, you can access it here: Also, just for information purposes, most of the requests in this documentation will have the fields below: Campo Digite a informação Id Unique message identifier to Enter the phone number of the person who will receive the message (with area code and the 9th digit) + @sms.gw.msging.net. For example: 5511988887777@sms.gw.msging.net type text/plain content Enter the text of the desired message; Note: in the “to” field, it is mandatory to include the “+” before the DDI, since the “+” is used for international SMS. To generate the id for the requests below, you can either generate it manually or by using a free GUID generator. Link to the GUID Guideline by Microsoft: Guid.NewGuid Método (System) | Microsoft Docs Link to free online GUID generator: Free Online GUID Generator 2) Single Shot If you want to send an SMS to only one number, it will be sent individually. First, use the 'Send a Message' request. You can get more details about this request at: Blip Docs | API Reference Change the 'to' field to the following pattern below. This field indicates to whom you want to send the message: IDD + DDD (with the 9th digit included) + phone number + @sms.gw.msging.net Number Number with Pattern 5511988887777 5511988887777@sms.gw.msging.net 4) In the 'content' field, which represents the message content, add the desired message text. 5) Select the "POST" option to set the request type and send. 6) Your request will follow the following template: 6) There, you have performed an SMS firing via API! 3) Multiple Shots: If you want to send an SMS to multiple numbers, your shot will be to multiple contacts. Create a distribution list using the 'Create a List' request, POST method. You can get more details about this request at: Blip Docs | API Reference With the list created, add the users you want to impact using the 'Add a member to a list' request following the format below. You can find more details about this request at: Blip Docs | API Reference. {{full user number with the 9th digit}}@sms.gw.msging.net. To send the message, use the 'Send a message' request with the complete name of the list created in the 'to' field and the content of the message in the 'content' field: Blip Docs | API Reference. There, you have performed an SMS firing via API! SMS Channel Best Practices 1) Activate SMS on an SMS-only chatbot For easier message control, we recommend that the SMS flow is exclusive to an SMS chatbot, i.e. it is not recommended to activate SMS in a chatbot that has WhatsApp flow. In that case, create a separate chatbot just for the SMS flow. If you activate SMS in a chatbot that has a WhatsApp flow and trigger an interactive component, such as buttons or dynamic content, since these components do not exist in SMS and both channels are using the same flow, the component will not be sent in the expected format and you may still be charged for more messages due to the amount of characters this behavior will generate. Thus, the message will not work as expected, it will be too long, and it will still have several special characters that will be accounted for financially. Types of messages allowed in SMS Types of messages not allowed in SMS Texts Buttons Images* Quick Reply Vídeo* Menu Web link Audio Carousel Search Location Dynamic Content *Pictures and videos: are sent via a link that redirects to the picture/video you sent. 2) To send only active messages, no chatbot flow is required If you just want to send messages to your user, without the need to receive the replies to that message, just make your SMS activation in a chatbot that doesn't have a flow in Builder. If there is such a flow, waiting for responses from the user and continuing the "conversation" between the customer and the chatbot, the payment will be accounted for due to the continuity of the messages sent. For more information, visit the discussion on the subject in our community or the videos on our channel. 😃 Related articles Sending WhatsApp Active Messages on Blip Desk FAQ - Channels Finding my bot's API-KEY Custom Breaks Active Messages - Error Codes