High-quality SMS with delivery reports, customised sender and real-time sending
Integrates via API the professional SMS sending service for authentication, notifications, reminders, alerts to single or multiple recipients
All the knowledge you need
Here you can find some advice to consider to approach this API. If you prefer, we provide code samples, OAS3 documentation, the ability to try the API live via the Swagger UI or import the entire collection into Postman. We also offer a Sandbox environment where you can experiment with all kinds of requests completely free of charge.
Get the token in the appropriate section before you start.
- Oas file url https://console.openapi.com/oas/en/gatewaysms.openapi.json
- Fork or import with Postman
- Production domain ws.messaggisms.com
- Sandbox domain test.ws.messaggisms.com
- Production Scopes 4
-
Sandbox Scopes 4
- PUT test.ws.messaggisms.com/messages
- POST test.ws.messaggisms.com/messages
- GET test.ws.messaggisms.com/messages
- DELETE test.ws.messaggisms.com/messages
Gateway SMS (1.0.0)
This web service exposes REST calls to send text messages directly from our gateway
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) | |
success | boolean |
message | string |
credit | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
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
- 200
- 404
- "data": [
- {
- "sender": "alberto",
- "timestamp": "1564411330117",
- "id": "5d3f05c29f2725610c2b4e60"
- {
- "sender": "3939989741",
- "timestamp": "1563554978976",
- "id": "5d31f4a29f27257de166d960"
- {
- "sender": "3939989741",
- "timestamp": "1562686328690",
- "id": "5d24b3789f27257de1645bda"
- {
- "sender": "Nome del mittente",
- "timestamp": "1562142688118",
- "id": "5d1c67e09f27255e2f4079a3"
- {
- "sender": "Nome del mittente",
- "timestamp": "1562142398400",
- "id": "5d1c66be9f272563102e8045"
- "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 By default it is false, if set to true it simulates a send |
sender required | string The sender must be between 3 and 11 characters if alphanumeric and between 3 and 14 if numeric |
body required | 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> 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 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) | |
success | boolean |
message | string |
credit | string |
error | integer |
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "test": false,
- "sender": "alberto",
- "body": "test invio",
- "recipients": "+39-349xxxxx18"
Response samples
- 201
- 402
- 422
- "data": [
- {
- "test": false,
- "sender": "alberto",
- "body": "test invio",
- "recipients": {
- "valid": {
- "count": 1
- "invalid": {
- "total": 0,
- "list": [ ]
- "transaction": false,
- "options": {
- "bulk": false,
- "flash": false,
- "realtime": false,
- "timestamp_send": "1564752494920"
- "statistics": {
- "error": 0,
- "sent": 0,
- "delivered": 0,
- "total": 1,
- "sms_total": 1
- "base_price": 0.0315,
- "timestamp": "1564752494920",
- "last_update": "1564752494920",
- "priority": 1,
- "price": 0.0315,
- "state": 0,
- "id": "5d443a6e9f2725660f3db347"
- "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 Example: 5cf7cc139f272546624d3795 Message Id |
Responses
Response Schema: application/json
Array of objects (Message_Object) | |
success | boolean |
message | string |
credit | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
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
- 200
- 406
- "data": [
- {
- "test": false,
- "sender": "Simone",
- "body": "Production test 4 ",
- "recipients": {
- "valid": {
- "count": 1
- "invalid": {
- "total": 0,
- "list": [ ]
- "priority": 1,
- "options": {
- "flash": true,
- "realtime": true,
- "timestamp_send": "326152800000",
- "custom": {
- "test": 123,
- "best": 321,
- "trest": [
- 12,
- 3,
- 12,
- 3
- "transaction": false,
- "statistics": {
- "error": 0,
- "sent": 1,
- "delivered": 1,
- "total": 1,
- "sms_total": 1
- "base_price": 0.03,
- "timestamp": "1559743507600",
- "last_update": "1559743510156",
- "price": 0.036,
- "state": 2,
- "id": "5cf7cc139f272546624d3795"
- "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 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
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "recipients": [
- "+39-3xxxxxx115"
- "options": {
- "timestamp_send": "2023-12-25"
Response samples
- 200
- 402
- 404
- 406
- 422
- "data": {
- "test": false,
- "sender": "alberto",
- "body": "test invio",
- "recipients": {
- "valid": {
- "count": 4
- "invalid": {
- "total": 0,
- "list": [ ]
- "transaction": true,
- "options": {
- "bulk": false,
- "flash": false,
- "realtime": false,
- "timestamp_send": "1564751430282"
- "statistics": {
- "error": 0,
- "sent": 0,
- "delivered": 0,
- "total": 4,
- "sms_total": 4
- "base_price": 0.126,
- "timestamp": "1564751430282",
- "last_update": "1564751430282",
- "priority": 1,
- "price": 0.126,
- "state": 0,
- "id": "5d4436469f272566771c6671"
- "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 Example: 5cf7cc139f272546624d3795 Message Id |
Responses
Response Schema: application/json
data | Array of strings |
success | boolean |
message | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
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
- 200
- 400
- 404
- 406
- 422
- "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 Example: 5e5e65429f272510fb6adcc0 Message Id |
Responses
Response Schema: application/json
Array of objects (Recipient_Object) | |
success | boolean |
message | string |
credit | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
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
- 200
- 404
- 406
- "data": [
- {
- "number": "+39-3xxxxx5018",
- "prefix": "+39",
- "send_id": "5e5e65429f272510fb6adcc0_0",
- "body": "test summary2",
- "sms": 1,
- "remaining_chr": 147,
- "state": "DELIVERED",
- "state_description": "DELIVERED_TO_HANDSET",
- "price": 0.03,
- "fields": [ ],
- "message_id": "5e5e65429f272510fb6adcc0",
- "i": 0,
- "state_detail": "Message delivered to handset",
- "timestamp_sent": {
- "$date": {
- "$numberLong": "1583244661371"
- "real_cost": 0.03,
- "report": {
- "price": {
- "pricePerMessage": 0.03,
- "currency": "EUR"
- "status": {
- "id": 5,
- "groupId": 3,
- "groupName": "DELIVERED",
- "name": "DELIVERED_TO_HANDSET",
- "description": "Message delivered to handset"
- "error": {
- "id": 0,
- "name": "NO_ERROR",
- "description": "No Error",
- "groupId": 0,
- "groupName": "OK",
- "permanent": false
- "messageId": "5e5e65429f272510fb6adcc1",
- "doneAt": "2020-03-03T15:11:03.168+0100",
- "smsCount": 1,
- "sentAt": "2020-03-03T15:11:01.467+0100",
- "to": "393495155018"
- "timestamp_delivery": {
- "$date": {
- "$numberLong": "1583244663000"
- "id": "5e5e65429f272510fb6adcc1"
- "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 Example: 5e5e65429f272510fb6adcc0 Message Id |
number required | string Example: +39-34xxxxx018 Recipient number |
Responses
Response Schema: application/json
Array of objects (Recipient_Object) | |
success | boolean |
message | string |
credit | string |
error | integer |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
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
- 200
- 404
- 406
- "data": [
- {
- "number": "+39-3xxxxx5018",
- "prefix": "+39",
- "send_id": "5e5e65429f272510fb6adcc0_0",
- "body": "test summary2",
- "sms": 1,
- "remaining_chr": 147,
- "state": "DELIVERED",
- "state_description": "DELIVERED_TO_HANDSET",
- "price": 0.03,
- "fields": [ ],
- "message_id": "5e5e65429f272510fb6adcc0",
- "i": 0,
- "state_detail": "Message delivered to handset",
- "timestamp_sent": {
- "$date": {
- "$numberLong": "1583244661371"
- "real_cost": 0.03,
- "report": {
- "price": {
- "pricePerMessage": 0.03,
- "currency": "EUR"
- "status": {
- "id": 5,
- "groupId": 3,
- "groupName": "DELIVERED",
- "name": "DELIVERED_TO_HANDSET",
- "description": "Message delivered to handset"
- "error": {
- "id": 0,
- "name": "NO_ERROR",
- "description": "No Error",
- "groupId": 0,
- "groupName": "OK",
- "permanent": false
- "messageId": "5e5e65429f272510fb6adcc1",
- "doneAt": "2020-03-03T15:11:03.168+0100",
- "smsCount": 1,
- "sentAt": "2020-03-03T15:11:01.467+0100",
- "to": "393495155018"
- "timestamp_delivery": {
- "$date": {
- "$numberLong": "1583244663000"
- "id": "5e5e65429f272510fb6adcc1"
- "message": "1 Result",
- "credit": 90.20949999999985,
- "success": true,
- "error": null