How do I add a line break in my SMS or MMS message?

To include line breaks in your messages sent from Plivo, you may need to encode the line break \n in your code. Here’s an example of how this works:


curl -X POST<auth_id>/Message/ \
  -u <auth_id>:<auth_token> -H 'Content-Type: application/json' \
  -d '{  "src" : "14845355114", 
  "dst" : "14845355111"  , 
  "text": "Here is my first line\nHere is my second line" 

This example sends an outbound message from the sender (484) 535-5114 (+14845355114) to the recipient at (484) 535-5111 (+14845355111), and includes the following message:

Here is my first line
Here is my second line
  • Line 1 update with your Auth ID
  • Line 2 update with your Auth ID and Auth Token
  • Line 3 update with a valid sender/from number
  • Line 4 update with a valid destination number
  • Line 5 update with the desired message text
Was this article helpful?
0 out of 0 found this helpful
Didn’t find what you are looking for? Create new ticket