Table of contents

HTTP interface

The HTTP Interface is a common way to send SMS from third party applications. It allows you to send SMS using simple HTTP GET or POST requests, or using a [Json REST API[(rest.html).

The HTTP Interface menu is accessible from the Settings menu. You need to be logged in as an administrator to access this menu.

Screenshot of HTTP interface settings

To enable the HTTP and Json REST interface, check the Enable HTTP and REST Interface checkbox.

Access Control allows you to control who can use this interface. The HTTP and REST interfaces are available to Everybody unless they are restricted. If restricted the HTTP requests must supply the Authorization header to specify a valid username and password with sufficient rights.

Sending SMS using Json REST API

SysManX has a JSON REST based API that can be used to manage Numberlists, query sent and received messages, and submit messages for sending. This API uses the Open API 3.0 standard. You can browse documentation and test the API with Swagger-UI here

Sending SMS using simple HTTP GET/POST

The URL access point for the HTTP Interface is:

http://localhost:5000/sms

Replace localhost with server name or IP-address if you are sending SMS from another machine.

The following parameters can be used:

  • recipient can be a mobile number, or the name of a Numberlist. You cannot specify more than one number or Numberlist.
  • message is the message text that you want to send.
  • messageType can be set to indicate the type of message (Text, Flash or Wakeupcall). Optional parameter, and the default value is "Text".
  • deliveryReport is a boolean parameter that can be used to request a delivery report. Optional parameter, and the default value is "false".
  • deliveryTime is an optional parameter that sets a specific time when the message should be sent. The date format used is: YYYYMMdd-hhmm. If not set, the message will be sent immediately. If set to a date and time that has not yet passed, the message will be stored in SysManX and sent to the mobile operator at that specific time. SysManX must be running at that time for the message to be sent.
  • externalId is an optional parameter that can be used to tag the message with an external id. The provided value will be stored as a string value on the submitted message and can be used to query the message using the REST-API.
  • masked is an optional parameter that can be set to mask/hide the message text. If set to true the message text will not be visible, and permanently masked out after the message has been sent.

Sample HTTP GET request:

This request will send a message with the text "test" to number 92929292:

http://localhost:5000/sms?recipient=92929292&message=test

The server will return an HTTP Statuscode 200 (OK) response with a body containing "OK", or any other message if it failed.

Sample HTTP POST request

This request will send a message with the text "test æøå of nordic letters" to number "92929292".

POST /sms HTTP/1.1
Host: localhost:5000
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Authorization: Basic YWRtaW46cGfdsSFvxwcmQ=

recipient=92929292&message=test+%C3%A6%C3%B8%C3%A5+of+nordic+letters

Note the use of the Authorization header in this sample. It is only required if you have configured SysManX to require authentication for the HTTP Interface.