How to retrieve SMS message status

 

The SCG messaging API and UI Voice and Messaging Console provide ways to retrieve the status of sent messages in single or bulk methods.

This document describes how to retrieve the status of a message already sent.

 

Message Status in Voice and Messaging Console

To retrieve the status of a message in the Voice and Messaging Console, just have to select the Messaging / OUTBOX / Bulk Massage for in bulk sent messages or select the Messaging / OUTBOX / Single Massage for in single sent message.

screen0.jpg

In this UI there are two filters that can be used to find messages by State, time frame (Custom period, Last 30 days or Last 7 days) or by Sender ID. This is useful if there are a lot of messages as it reduces the number of messages shown in the UI.

Example: in this case the UI shows many messages that you could shrink using the filters:

screen1.jpg

 

 

The list of sent messages can be reduced by filtering by Customer Sender ID: for this enter the sender ID in the field and click the View button:

screen2_.jpg

 

This screen shows the messages Status in the fourth column. This UI works the same way for Bulk sent messages.

 

There is also the Reports / Messages option:

screen5_.jpg

 

where there are available filters to reduce que displayed messages:

screen6_.jpg

 

In this report the columns 1 and 2 shows the Message ID and the Message Request ID

 

Retrieve Messages Status using the SCG messaging API

SCG API allows you retrieve the messages status programmatically.

There are 2 API’s methods:

…/api/v1/messaging/message_requests/{request_ID}

Or

…/api/v1/messaging/messages/{message_ID}

 

Example:

A message for multiple destination mobile numbers SCG create 1 request and multiple messages.

In this example: a message sent to multiple mobile numbers:

The message Request ID: KeIc1Xy5tAXDDvOvJgRPI

The messages IDs:         

YVRdU5fdhL1XJn9zRbOfK1

pFMDaC6PoC6hPhNfTxzVK1

 

The Message Request Status can be retrieved by the SCG API:

Curl command to retrieve a message request: …/api/v1/messaging/message_requests/{request_ID}

curl -L -X GET \
https://api.syniverse.com/scg-external-api/api/v1/messaging/message_requests/KeIc1Xy5tAXDDvOvJgRPI \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [TOKEN]"

Retrieved message request:

{
"application_id": 11407,
"company_id": [company_id],
"created_date": 1658342997933,
"last_updated_date": 1658342998128,
"version_number": 2,
"id": "KeIc1Xy5tAXDDvOvJgRPI",
"from": "channel:Bxn9SHBYhl89KnuDllO2L4",
"to": [
"+5066173XXXX",
"+5066016XXXX"
],
"body": "Test message for multiple mobile numbers",
"state": "COMPLETED",
"channel_id": "Bxn9SHBYhl89KnuDllO2L4",
"recipient_count": 2,
"sent_count": 2,
"delivered_count": 2,
"media_requested_count": 0,
"read_count": 0,
"click_thru_count": 0,
"converted_count": 0,
"canceled_count": 0,
"failed_count": 0,
"sender_id_sort_criteria": [],
"contact_delivery_address_priority": [],
"scheduled": false,
"request_start_time": 1658342995999
}

 

 

 

A single message Status can be retrieved by the SCG API: …/api/v1/messaging/messages/{message_ID}

Curl command to retrieve a message request:

curl -L -X GET \
https://api.syniverse.com/scg-external-api/api/v1/messaging/messages/YVRdU5fdhL1XJn9zRbOfK1 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [TOKEN]"

Retrieved json shows the single message state:

{
"application_id": 11407,
"company_id": [company_id],
"created_date": 1658342998071,
"last_updated_date": 1658343004836,
"version_number": 3,
"id": "YVRdU5fdhL1XJn9zRbOfK1",
"message_request_id": "KeIc1Xy5tAXDDvOvJgRPI",
"direction": "MT",
"customer_sender_id": "FVwXNFWghnXyBazsR1HxQ3",
"from_address": "7777",
"to_address": "+5066016XXXX",
"state": "DELIVERED",
"body": "Test message for multiple mobile numbers",
"sent_date": 1658342998178,
"delivered_date": 1658343000000,
"attachments": [],
"channel_id": "Bxn9SHBYhl89KnuDllO2L4",
"type": "SMS",
"destination_country": "CRI",
"price": 0.024,
"sender_id_alias": "FVwXNFWghnXyBazsR1HxQ3",
"fragments_info": [
{
"fragment_id": "Dcn66F13y7YpoVNRLDmhT6",
"fragment_state": "DELIVERED",
"charge": 0.024,
"external_id": "102420229621653211054614",
"delivery_report_reference": "YVRdU5fdhL1XJn9zRbOfK1"
}
],
"consent_requirement": "NONE",
"standalone": false,
"request_start_time": 1658342995999
}

 

 

Was this article helpful?
0 out of 0 found this helpful

0 Comments

Please sign in to leave a comment.