Single SMS API
Send SMS using a template
SMS is a simple and cost-effective way to communicate with customers. Before starting to send the SMS APIs, make sure that you have configured the SMS channel in Kalyra.io. This section details how to send your first outbound SMS using an API request.
To send marketing messages use "type" value as "MKT".
To send transactional messages use "type" value as "TXN".
To send otp messages use "type" value as "OTP".
post/v2/{sid}/messages
Request
- Base URLapi.in.kaleyra.io (relative, and the document’s source URL is not known)
- URLapi.in.kaleyra.io/v2/{sid}/messages
- Authnone declared. Required headers: api-key, Content-Type
Path parameters
sidstring required
Headers
api-keystring required
API Key generated by kaleyra.io. Example - Ac4XXXXX21f
Content-Typestring required
The format in which the data is sent.
Request body application/x-www-form-urlencoded
Example request
{
"to": "{{to}}",
"sender": "{{sender_id}}",
"body": "{{body}}",
"template_id": "{{template_id}}",
"type": "MKT",
"callback_profile_id": "{{callback_profile_id}}",
"template_data": "{\"OTP\": 12345}",
"campaign_name": "Campaign",
"ref": "Reference Data",
"ref1": "Reference Data 2",
"ref2": "Reference Data 3"
}Response
Successful response
Changes
No recorded changes to this operation across all 2 revisions of this API.