Run with Postman

Gateway SMS (1.0.0)

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://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.

Short messages can be encoded using a variety of alphabets: the default GSM 7-bit alphabet, the 8-bit data alphabet, and the 16-bit UCS-2 or UTF-16 alphabets. Depending on which alphabet the subscriber has configured in the handset, this leads to the maximum individual short message sizes of 160 7-bit characters, 140 8-bit characters, or 70 16-bit characters. GSM 7-bit alphabet support is mandatory for GSM handsets and network elements, but characters in languages such as Hindi, Arabic, Chinese, Korean, Japanese, or Cyrillic alphabet languages (e.g., Russian, Ukrainian, Serbian, Bulgarian, etc.) must be encoded using the 16-bit UCS-2 character encoding. Routing data and other metadata is additional to the payload size. Larger content (concatenated SMS, multipart or segmented SMS, or "long SMS") can be sent using multiple messages, in which case each message will start with a User Data Header (UDH) containing segmentation information. Since UDH is part of the payload, the number of available characters per segment is lower: 153 for 7-bit encoding, 134 for 8-bit encoding and 67 for 16-bit encoding. The receiving handset is then responsible for reassembling the message and presenting it to the user as one long message. While the standard theoretically permits up to 255 segments, 10 segments is the practical maximum with some carriers, and long messages are often billed as equivalent to multiple SMS messages.

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://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

If a message exists with 'transaction = true', this method allows integrating the initial POST call (adding recipients for example) until a PUT with 'transaction = false' is passed. At that point the message is closed and put in the sending queue. With this method you can also change the sending date of the message ('timestamp_send') (if it hasn't already been sent or scheduled for sending).

Authorizations:
Request Body schema: application/json
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

transaction
boolean
Default: "<boolean>"

Until it is set to false the transaction is not closed and the message will not go into the sending queue

object

Responses

Response Schema: application/json
object (Message_Object)
success
boolean
message
string
credit
string
error
integer

Request samples

Content type
application/json
{
  • "recipients": [
    ],
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "message": "Updated",
  • "credit": "90.97149999999986",
  • "success": true,
  • "error": null
}

Delete a single message

This method allows you to cancel and therefore not send a message (not allowed on messages already sent or scheduled for sending). With the cancellation there is no refund on the spent credits.

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

Message Id

Responses

Response Schema: application/json
data
Array of strings
success
boolean
message
string
error
integer

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "https://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": "5cf7cc139f272546624d3795 Deleted",
  • "success": true,
  • "error": null
}

Get the recipients from a message

This method allows you to see the recipients of a particular message

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

Message Id

Responses

Response Schema: application/json
Array of objects (Recipient_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://ws.messaggisms.com/messages/%7Bid%7D/recipients/");

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.20949999999985,
  • "success": true,
  • "error": null
}

Get the recipient from a message

This method allows you to see the specific recipient of a particular message

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

Message Id

number
required
string
Default: "<string>"
Example: +39-34xxxxx018

Recipient number

Responses

Response Schema: application/json
Array of objects (Recipient_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://ws.messaggisms.com/messages/%7Bid%7D/recipients/%7Bnumber%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.20949999999985,
  • "success": true,
  • "error": null
}