Login

  • Webservices Gateway Sms
  • GET Messages

List of messages

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

Resource

Production environment:

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

Testing environment

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

Parameters

Request Example

Response

Response Format

If successful, the response header HTTP status code will be 200 OK 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 resent only if the API call fails, it contains an error code.

Data Response Details

If the request is for all the messages:

Parameter Type Description
sender string Sending sender.
timestamp string Message storage timestamp.
id string Unique code of the message.

Data Response Details

If the request is for a specific message:

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.
priority double Priority value set.
options OptionsResponseDetails Report of the sending options used.
transaction boolean Status of the transaction.
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.
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.

Options Response Details

Parameter Type Description
flash boolean Report of the option you set in post.
timestamp_send string Report of the option you set in post.
custom string Report of the option you set in post.
callback_url string Report of the option you set in post.
callback_field string Report of the option you set in post.
realtime boolean Report of the option you set in post.
bulk boolean Report of the option you set in post.

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.

Data Response Details

If the request is to return the recipients of a specific message:

Parameter Type Description
number string Full recipient number
prefix string International prefix of the recipient number.
send_id string Unique identifier of the individual recipient.
body string Text of the sms.
sms int Represents the text message count that varies according to the number of characters used.
remaining_chr int Number of characters remaining before a new message is counted.
state string Sending status.
state_description string Description of the sending status.
price double Cost of the message to the individual recipient.
fields object If you passed it on call the same object returns.
message_id string Message identifier.
i int Represents the position of the recipient in the list.
state_detail string Detail of the sending status.
timestamp_sent string Timestamp of actual sending.
real_cost double Cost of the message.
report ReportResponseDetails Object with all the information of the message, such as costs, states and possible errors, returned by the provider that takes care of sending the message. If "bulk" is TRUE, this field is not present.
timestamp_delivery string Timestamp of actual delivery of the text message to the recipient. If "bulk" is TRUE, this field is not present.
id string This is the unique identifier of the message recipient.

Report Response Details

Parameter Type Description
price PriceResponseDetails Price details.
status StatusResponseDetails Status detail.
error ErrorResponseDetails Error detail.
messageId string This is the unique identifier of the message recipient.
doneAt string Date and time of receipt of the report.
smsCount int Account of sent messages.
sentAt string Dates and time of sending.
to string Recipient.

Price Response Details

Parameter Type Description
pricePerMessage double Price for each message sent.
currency string Payment currency.

Status Response Details

Parameter Type Description
id int State id.
groupId int Group id.
groupName string Group name.
name string State name.
description string Description of the state.

Error Response Details

Parameter Type Description
id int Error id.
name string Error name.
description string Error description.
groupId int Group id.
groupName string Group name.
permanent boolean

Additional examples

Request of a specific message:

Response


Additional examples

Request of the recipients a specific message:

Response