GCC
SMS Gateway
POST/v1/sms

Send SMS

Send a text message to one or more numbers.

numbersinternational format without zeros (9665xxxxxxxx), comma-separated
messagethe text to send
Errors
  • 400invalid_requestbad number or field
  • 401unauthorizedbad or disabled key
  • 402no_balancenot enough credit
  • 429rate_limitedtoo many requests
  • 502send_failedcouldn't be sent
Request
curl --location 'https://sms.gccksa.com/v1/sms' \
--header 'Authorization: Bearer xxxx' \
--header 'Content-Type: application/json' \
--data '{"numbers": "xxxx,xxxx", "message": "xxxx"}'
200 accepted
{
  "status": "accepted",
  "recipients": 2,
  "credits": 3,
  "id": "xxxx"
}
POST/v1/otp/send

Send OTP

We send an OTP to the number and return a request id to verify it against.

numberinternational format without zeros (9665xxxxxxxx)
langoptional, en or ar (default en)
Errors
  • 400invalid_requestbad number
  • 401unauthorizedbad or disabled key
  • 402no_balancenot enough credit
  • 429rate_limitedtoo many requests
  • 502send_failedcouldn't be sent
Request
curl --location 'https://sms.gccksa.com/v1/otp/send' \
--header 'Authorization: Bearer xxxx' \
--header 'Content-Type: application/json' \
--data '{"number": "xxxx", "lang": "en"}'
200
{ "status": "sent", "credits": 1, "id": "xxxx" }
POST/v1/otp/verify

Verify OTP

Verify that the OTP matches the request id from the Send OTP request.

Errors
  • 400invalid_requestmissing id or code
  • 401unauthorizedbad key, or wrong code
  • 402no_balancenot enough credit
  • 404not_foundunknown id
  • 429rate_limitedtoo many tries
Request
curl --location 'https://sms.gccksa.com/v1/otp/verify' \
--header 'Authorization: Bearer xxxx' \
--header 'Content-Type: application/json' \
--data '{"id": "xxxx", "code": "xxxx"}'
200
{ "verified": true }
GET/v1/balance

Check balance

Your remaining credit balance and how much you have used this month.

Errors
  • 401unauthorizedbad or disabled key
Request
curl --location 'https://sms.gccksa.com/v1/balance' \
--header 'Authorization: Bearer xxxx'
200
{ "available": 25000, "usedThisMonth": 1200 }
POST/v1/messages

Delivery status

Get the delivery status of each number in a send, using the request id.

Errors
  • 400invalid_requestmissing id
  • 401unauthorizedbad or disabled key
  • 404not_foundunknown id
Request
curl --location 'https://sms.gccksa.com/v1/messages' \
--header 'Authorization: Bearer xxxx' \
--header 'Content-Type: application/json' \
--data '{"id": "xxxx"}'
200
{
  "id": "xxxx",
  "messages": [
    { "number": "xxxx", "status": "delivered" },
    { "number": "xxxx", "status": "sent" }
  ]
}