DEMO MODE: synthetic data in a sandbox. Messages are simulated, nothing is really sent. Enter the demo
SMS Send (demo)

How to send SMS from a GoIP / Ejoin gateway over HTTP

A GoIP or Ejoin gateway holds real SIM cards and can send SMS from them. Besides its web panel it has an HTTP API, so your own software can queue messages without anyone logging in. This guide shows the request, how the gateway reports back, and what usually goes wrong.

1. Queue a message

POST a JSON task list to goip_post_sms.html on the gateway, with the panel username and password in the query string:

POST http://<gateway-address>/goip_post_sms.html?version=1.1&username=<user>&password=<pass>
Content-Type: application/json;charset=utf-8

{
  "type": "send-sms",
  "task_num": 1,
  "sr_url": "https://your-server.example/sms-report",
  "tasks": [
    { "tid": 1001, "from": "1", "to": "<number>", "sms": "Your code is 123456", "sdr": 1, "fdr": 1 }
  ]
}

The reply lists one status per tid. A status starting with 0 means the gateway accepted the task. It does not mean the SMS was sent yet.

2. Status codes worth handling

3. Know when it was really sent

Accepted is not sent. The gateway posts the final result to your sr_url when the SIM has sent the message or failed. Build your own handling for the case where no report ever arrives: ask the gateway whether the task is still queued (goip_get_tasks.html) before you assume it failed, otherwise you can send the same message twice.

To take a task back out of the queue, call goip_remove_sms.html with the tid. Never call it with an empty list: that removes every queued task on the gateway.

4. Mistakes that cost the most time

Don't want to run this yourself?

SMS Send does all of the above for you: a web panel and a single API call, a status for every message, an automatic retry on another SIM, and automatic refunds for failures. See the API or create an account.