Before you Begin
What are Code Snippets?
Code snippets are short pieces of code you can reuse in your own applications. Please read this information carefully before attempting to use the code snippets.
Prerequisites
- Create a SendLime account โ sign up for free.
- Generate an API key โ your key starts with
sl_live_and is used in theAuthorizationheader. - Add balance for SMS โ SMS messages cost credits. Top up from the Billing page.
- Connect WhatsApp for WhatsApp messages โ use your default WhatsApp profile, or pass a WhatsApp
brand_idto select a specific approved profile.
Authentication
All API requests require a Bearer token in the Authorization header:
Authorization: Bearer sl_live_your_key_here
Base URL
https://api.sendlime.com/api/v2
Channels
- Use
"channel": "sms"for SMS. - Use
"channel": "whatsapp"for WhatsApp. - SMS currently costs
0.5BDT per delivered message. - WhatsApp currently costs
0credits, but the recipient number must be on WhatsApp.