SPAMSMS.NET
Developer Center

API Documentation

Kết nối hệ thống qua REST API, xác thực bằng API Key và theo dõi số lượt còn lại ngay trong tài khoản.

Base URL

https://spamsms.net/api.php

Authentication

API-Key: your_api_key_here

Send SMS

POST
/api.php?action=send

Parameters

phoneSố điện thoại gồm 10 số, bắt đầu bằng 0. BẮT BUỘC
amountSố lượng SMS, mặc định 1 và tối đa 10.

Ví dụ cURL

bash
curl -X POST https://yourdomain.com/api.php?action=send \
  -H "API-Key: your_api_key" \
  -d "phone=0987654321&amount=1"

Response Success

json
{
  "success": true,
  "message": "Gửi SMS thành công!",
  "data": {
    "phone": "0987654321",
    "amount": 1,
    "remaining": 99,
    "total_sent": 10,
    "http_code": 200,
    "response": "OK"
  }
}

Response Error

json
{
  "success": false,
  "error": "Not enough SMS remaining. Còn: 0, Cần: 1"
}

Get Stats

GET
/api.php?action=stats

Ví dụ cURL

bash
curl -X GET https://yourdomain.com/api.php?action=stats \
  -H "API-Key: your_api_key"

Response

json
{
  "success": true,
  "data": {
    "username": "your_username",
    "package": "monthly",
    "package_name": "Gói 30 Ngày",
    "remaining": 3999,
    "total_sent": 1,
    "balance": 999999999,
    "expiry": "2026-08-21 13:25:59"
  }
}

Error Codes

401Invalid API Key
403Package required — vui lòng mua gói để sử dụng API.
400Invalid parameters (phone, amount).
429Not enough SMS remaining.
500Server error.

Yêu cầu sử dụng

API chỉ khả dụng cho người dùng đã mua gói. Tài khoản miễn phí có thể nâng cấp tại đây.

Số lượng SMS tối đa mỗi lần gọi: 10.

HỖ TRỢ