Developer API Reference

Integrate SMS capabilities into your applications. Send messages, manage OTPs, and track delivery status programmatically.


Base URL:

Authentication & Security

All API requests require authentication via an API Key. You can generate this key in your User Dashboard under "My Profile".

Security Tip: For enhanced security, configure Whitelisted IPs in your dashboard to restrict API access to your server's IP address only.
Standard Request Format

Requests can be made via GET or POST. The response is always JSON.

{
    "status": "success",
    "message": "Operation successful.",
    "response": true,
    "data": { ... }
}
POST

Send SMS

Queue a standard text message to be sent via a specific device.

Parameters
ParameterRequiredDescription
api_keyYesYour 64-char API Key.
actionYesValue: send_sms
device_idYes*Device ID or UID. (*One of device_id or device_uid required).
phone_numberYesRecipient number (e.g. +8801700000000).
messageYesText content of the SMS.
sim_slotNo1 or 2. Defaults to 1.
Example Request
curl -X POST https://isms.my.id/myAPI.php \
  -d "api_key=YOUR_KEY" \
  -d "action=send_sms" \
  -d "device_uid=70d05483459a53d7" \
  -d "phone_number=+8801712345678" \
  -d "message=Hello World" \
  -d "sim_slot=1"
Example Response
{
    "status": "success",
    "message": "SMS queued successfully.",
    "response": true,
    "data": {
        "message_id": 145,
        "status": "pending",
        "sim_slot": 1
    }
}
POST

Send OTP

Generates a numeric OTP, stores it securely, and queues an SMS. Use this for 2FA.

Parameters
ParameterRequiredDescription
actionYesValue: send_otp
device_uidYesDevice Unique ID.
phone_numberYesRecipient number.
lengthNoLength of OTP (default: 6).
expiryNoValidity in minutes (default: 5).
messageNoCustom template. Use {otp} placeholder.
Example Request
$response = file_get_contents('https://isms.my.id/myAPI.php?' . http_build_query([
    'api_key' => 'YOUR_KEY',
    'action' => 'send_otp',
    'device_uid' => 'DEVICE_ID',
    'phone_number' => '+8801712345678',
    'message' => 'Your login code is {otp}. Valid for 5 mins.',
    'length' => 4
]));
POST

Verify OTP

Validates an OTP provided by the user. Once verified, the OTP cannot be used again.

Parameters
ParameterRequiredDescription
actionYesValue: verify_otp
phone_numberYesThe phone number being verified.
otp_codeYesThe code entered by the user.
Example Response (Success)
{
    "status": "success",
    "message": "OTP Verified Successfully.",
    "response": true
}
Example Response (Error)
{
    "status": "error",
    "message": "Invalid or Expired OTP.",
    "response": false
}
GET

Check Message Status

Get the delivery status of a specific message using its ID.

GET https://isms.my.id/myAPI.php?action=check_status&api_key=KEY&message_id=145
Example Response
{
    "status": "success",
    "message": "Status found.",
    "response": true,
    "data": {
        "status": "sent",
        "created_at": "2025-11-25 10:00:00",
        "processed_at": "2025-11-25 10:00:05",
        "phone_number": "+8801712345678"
    }
}
GET

Get History

Retrieve logs of Sent (Outgoing) or Received (Incoming) messages.

Parameters
ParameterDescription
actionValue: get_history
typeoutgoing, incoming, or all (default).
limitNumber of records (max 100).
Example Request
GET https://isms.my.id/myAPI.php?action=get_history&api_key=KEY&type=incoming&limit=5
GET

Device Status

Get a list of all connected devices and their current status (running/stopped).

GET https://isms.my.id/myAPI.php?action=device_status&api_key=KEY