Login

  • Webservices Gateway Sms
  • PUT Messages

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.

Resource

Production environment:

  • https://ws.messaggisms.com/messages/"id"

Testing environment

  • https://test.ws.messaggisms.com/messages/"id"

Parameters

Property name Type Required Description
recipients string, object, array yes 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-3478569987", "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 no Until it is set to false the transaction is not closed and the message will not go into the sending queue.

Request examples

Response

Response Format

If successful, the response header HTTP status code will be 201 Created and the request will be answered.

If you try to get a request without authorization, you will receive an error 401 Unauthorized.

Additionally you should also handle the 400 Bad request status. For more info on HTTP status handling see dedicated section in Integration best practices page.

Request Response

Parameter Type Description
data DataResponseDetails Present only if the API call goes to good end, it will contain the answer data.
message string It contains a message that can be shown by the user.
credit string Remaining credit of the user.
success boolean True or false.
error int Present only if the API call fails, it contains an error code.

Data Response Details

Parameter Type Description
test boolean Identifies if it is a simulation or not.
sender string Sending sender.
body string Text of the sms.
recipients RecipientsResponseDetails Returns the number of "recipients" divided between valid and invalid.
transaction boolean Status of the transaction.
options object Report of the sending options used. Returns the same object with the values ​​passed by you or by default.
statistics StatisticsResponseDetails Report of the resulting sending statistics.
base_price double Starting cost of the text messages sent.
timestamp string Message storage timestamp.
last_update string Timestamp of the last modification of the message.
priority double Priority value set.
price double Total cost resulting from the base_price for the priority.
state int Sending status.
id string Unique identifier of the message.

Recipients Response Details

Parameter Type Description
valid object Contains the count of valid recipients.
count int Number of valid recipients.
invalid object Contains the list of invalid recipients.
total int Number of invalid recipients.
list array List of numbers considered invalid.

Statistics Response Details

Parameter Type Description
error int Number of errors; increases when sending is not completed.
sent int Number of text messages actually sent.
delivered int Number of text messages actually delivered.
total int Number of valid recipients.
sms_total int Number of sms formally correct and ready to be sent