SMSlenz API Integration Guide for Developers

  • Integrate SMS functionality directly into your applications with our powerful and easy-to-use REST API.

WooCommerce & WordPress Integration

smslenz.lk offers a dedicated WooCommerce add-on plugin, allowing you to integrate SMS notifications seamlessly into your WordPress store. With this plugin, you can send automated SMS updates to customers for various purchase events, enhancing engagement and communication.

Download the plugin SMSlenz for WooCommerce and start sending SMS notifications from your WordPress-powered store today!.

smslenz for wordpress

REST API Endpoint Guide

Need to integrate SMSlenz.lk with your custom development? No worries! We provide a complete guide for our direct API endpoints β€” you can call them directly from your application and start using our SMS services instantly.

Our API supports all major programming languages, including PHP, JavaScript, Python, Java, C#, Ruby, Go, and Node.js.
It works seamlessly with any type of application, whether it’s a web platform, desktop software, or mobile app (Android or iOS).

Direct Endpoints for smslenz.lk SMS Actions

  1. Send SMS
  2. Send Bulk SMS
  3. Account Status
Send SMS

Use this endpoint directly to send SMS to a contact number.

Request

URL: https://mail.smslenz.lk/api/send-sms

Type: POST or GET

Parameters
Key Required Value
user_id YES User ID from your settings page.
api_key YES API key from your settings page.
sender_id YES Your approved Sender ID. Use SMSlenzDEMO for testing. This one is case sensitive.
contact YES The recipient, Should be in the format of +9476XXXXXXX.
message YES The message. Max: 1500 chars.
Response

You will get a JSON response in a success attempt.

Content-Type: application/json

Body:

{
    "success": true,
    "message": "SMS sent successfully",
    "data": {
        "status": "success",
        "campaign_id": 42,
        "message": "Welcome to SMSlenz!",
        "sender_id": "SMSlenzDEMO",
        "pages": 1,
        "recipient_number": "9475XXXXXXX",
        "sms_credit_balance": "2,513.95"
    }
}
Send Bulk SMS

Use this endpoint directly to send SMS to multiple contact numbers.

Request

URL: https://mail.smslenz.lk/api/send-bulk-sms

Type: POST

Parameters
Key Required Value
user_id YES User ID from your settings page.
api_key YES API key from your settings page.
sender_id YES Your approved Sender ID. Use SMSlenzDEMO for testing. This one is case sensitive.
contacts YES The number of the recipients, Should be in the format of array
["+9476XXXXXXX","+9475XXXXXXX"].
message YES The message. Max: 1500 chars.
Response

You will get a JSON response in a success attempt.

Content-Type: application/json

Body:

{
    "success": true,
    "message": "SMS sent successfully",
    "data": {
        "status": "success",
        "campaign_id": 43,
        "message": "Welcome to bulk sms API!",
        "sender_id": "SMSlenzDEMO",
        "pages": 1,
        "no_of_recipients": 2,
        "sms_credit_balance": "2,512.77"
    }
}
Account Status

Use this endpoint to check the status of your account.

Request

URL: https://mail.smslenz.lk/api/account-status

Type: POST or GET

Parameters
Key Required Value
user_id YES User ID from your settings page.
api_key YES API key from your settings page.
Response

You will get a JSON response in a success attempt.

Content-Type: application/json

Body:

{
    "success": true,
    "message": "Account status retrieved successfully",
    "data": {
        "status": "active",
        "sms_credit_balance": "2,515.72",
        "active_plan": "Pay As You Go",
        "total_contacts": 3,115,
        "total_sender_ids": 6
    }
}

Go to API Settings Page.

See something missing? Please contact us and let us know your concern.

We are always happy to help with integrations.

Go back to smslenz.lk Home Page
Need Help? Chat with us