Run with Postman

Gateway SMS

This web service exposes REST calls to send text messages directly from our gateway

Messages

Calls to send, view and edit SMS messages

List of your messages

This method allows you to view the list of sent messages from your account

Authorizations:

Responses

Response Schema: application/json
Array of objects (Messages) [ items ]
success
boolean
message
string
credit
string
error
integer

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://test.ws.messaggisms.com/messages/");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "success": true,
  • "message": "5 Results",
  • "credit": "91.00299999999986",
  • "error": null
}

Send a sms message

This method allows you to send an sms message directly from our gateway

Authorizations:
Request Body schema: application/json
test
boolean
Default: "<boolean>"

By default it is false, if set to true it simulates a send

sender
required
string
Default: "<string>"

The sender must be between 3 and 11 characters if alphanumeric and between 3 and 14 if numeric

body
required
string
Default: "<string>"

Text of the sms; we can insert in the text the values ​​of the 'placeholder' parameters contained in 'fields' in this way: “body”: “Test invio {{name}}”

required
string or Array of strings or object

Phone number of the recipient and wanting the 'fields' object in which to insert the parameters that we want to enter in the 'body' like this: {'number':'+39-34xxxxx987', 'fields':{'name':'simone', 'surname':'rossi'}}. Mandatory is the international prefix which must be separated from the rest by '-' like this: '+39-number'. Any other format will be considered bad recipients and placed among the invalid

priority
number <double>
Default: "<double>"

Sending priority; default is 1.00 which is the minimum; increasing the priority increases the total cost of the message but assuming that in the queue there are 1000 messages with priority 1.00, by sending a message with priority 1.01 you skip the queue

object (Options)
transaction
boolean
Default: "<boolean>"

By default, FALSE is set. Set to TRUE, it starts a transaction by storing the data sent but not putting the request in the queue. Subsequent PUT calls can be made on the end point '/messages/{id}/' to integrate the initial POST call (for example adding recipients) until a PUT is sent with 'transaction' : FALSE. The ID field is returned from the first POST call. At that point the transaction (if valid) is closed and the message queues normally

Responses

Response Schema: application/json
Array of objects (Message_Object) [ items ]
success
boolean
message
string
credit
string
error
integer

Request samples

Content type
application/json
{
  • "test": false,
  • "sender": "alberto",
  • "body": "test invio",
  • "recipients": "+39-349xxxxx18"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "message": "Message Queued",
  • "credit": "90.90849999999988",
  • "success": true,
  • "error": null
}

Get a single message

This method allows you to see the single message related to the parameter passed in the path

Authorizations:
path Parameters
id
required
string
Default: "<string>"
Example: 5cf7cc139f272546624d3795

Message Id

Responses

Response Schema: application/json
Array of objects (Message_Object) [ items ]
success
boolean
message
string
credit
string
error
integer

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://test.ws.messaggisms.com/messages/%7Bid%7D");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "message": "1 Result",
  • "credit": "90.97149999999986",
  • "success": true,
  • "error": null
}

Message integration