On this page
POST /api/sms.php ยท GET /api/sms.php
Queue an SMS
Set recipient to a South African number in +27 format and send a UTF-8 message up to 459 characters. Message parts are counted at 160, 306 and 459 characters. HTTP 200 confirms queueing. Save sms_id and sms_count.
- HTTP 400 covers invalid input or a wallet balance of R1 or less.
- If HTTP 500 includes confirmation_pending and sms_id, poll that ID. If the outcome is unclear and you have no ID, check SMS History before trying again.
The POST queues a real SMS when you use your own account.
POST /api/sms.php
curl -4 -sS -i -X POST "${SIMCLOUD_API_BASE:-https://simcloud.co.za}/api/sms.php" \
-H "Authorization: Bearer $SIMCLOUD_API_TOKEN" \
-H 'Content-Type: application/json' \
--data '{
"recipient": "YOUR_27_CELL",
"message": "Example SMS from SIMcloud."
}'
HTTP 200 response excerpt
{
"status": "success",
"sms_count": 1
}
Check SMS delivery
Set SIMCLOUD_SMS_ID to the original sms_id. Checks in the first 15 seconds return queued. A sent message is accepted by the supplier. Poll for delivered or failed before treating the delivery as final. HTTP 404 means no message matched for the account.
GET /api/sms.php
curl -4 -sS -i "${SIMCLOUD_API_BASE:-https://simcloud.co.za}/api/sms.php" \
-H "Authorization: Bearer $SIMCLOUD_API_TOKEN" \
--get \
--data-urlencode "sms_id=$SIMCLOUD_SMS_ID"
HTTP 200 response excerpt
{
"status": "queued"
}