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:
Java
curl -X POST https://api.plivo.com/v1/Account/<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