API Documentation

Send SMS programmatically from your own application using your GOSMS API key.

Authentication

Generate your API key from Dashboard → API. Include it as the api_key parameter on every request.

Send SMS

POST https://gosms.click/api/send-sms.php

ParameterTypeDescription
api_keystringYour API key
numberstringRecipient number, e.g. 01700000000
messagestringSMS text, max 1600 characters

Example (cURL)

curl -X POST https://gosms.click/api/send-sms.php \
  -d "api_key=YOUR_API_KEY" \
  -d "number=01700000000" \
  -d "message=Hello World"

Example (PHP)

$ch = curl_init('https://gosms.click/api/send-sms.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    'api_key' => 'YOUR_API_KEY',
    'number'  => '01700000000',
    'message' => 'Hello World',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($ch), true);

Example (Laravel)

use Illuminate\Support\Facades\Http;

$response = Http::asForm()->post('https://gosms.click/api/send-sms.php', [
    'api_key' => config('services.gosms.key'),
    'number'  => '01700000000',
    'message' => 'Hello World',
])->json();

Example (Python)

import requests

response = requests.post('https://gosms.click/api/send-sms.php', data={
    'api_key': 'YOUR_API_KEY',
    'number': '01700000000',
    'message': 'Hello World',
})
print(response.json())

Example (Node.js)

const response = await fetch('https://gosms.click/api/send-sms.php', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    api_key: 'YOUR_API_KEY',
    number: '01700000000',
    message: 'Hello World',
  }),
});
const data = await response.json();
console.log(data);

Success Response

{
  "success": true,
  "message": "SMS sent successfully",
  "log_id": 1023,
  "cost": 0.4,
  "balance": 99.6
}

Error Codes

HTTPCodeMeaning
401MISSING_API_KEYNo api_key parameter sent
401INVALID_API_KEYKey is wrong or has been revoked
403ACCOUNT_SUSPENDEDYour account is suspended
400MISSING_PARAMETERSnumber or message missing
400INVALID_NUMBERNot a valid BD phone number
400MESSAGE_TOO_LONGMessage exceeds 1600 characters
402INSUFFICIENT_CREDITSNot enough SMS credits
429RATE_LIMITEDToo many requests - max 60/minute per key