Developers

Messaging API

get_mt_message


URL:

http://api.msgme.com/v1/messaging/get_mt_message

METHOD:

Get

DESCRIPTION:

Returns the details of Mobile Terminated (MT) Message(s). These are messages sent to a mobile phone.

PARAMETERS:

Parameter Description
token The security token that was returned using authentication_api method.
mtid (either mtid, parentMtid, or messageId must be used) The ID (or comma delimited list of IDs) of the MT Message(s) to fetch.
messageId (either mtid, parentMtid, or messageId must be used) The ID of the Mobile Terminated Message. This will return the status of the one message sent to one mobile phone.
parentMtid (either mtid, parentMtid, or messageId must be used) The Parent ID of a set of Mobile Terminated Messages. This will return the statuses of all the MTs in the group.


API REQUEST:

http://api.msgme.com/v1/messaging/get_mt_message?token=[token]&mtid=[MT message ID]&messageId=[(Optional, instead of MTID) transaction ID from Messaging API call]&parentMtid=[(Optional, instead of MTID) Parent MTID from messaging blast]



API RESPONSE:


		<?xml version="1.0" encoding="UTF-8"?>
		<apiResponse status="[status text]" statusCode="[status code]" >
			<messages startAt="1" numOfRecords="3">
				<mtMessage
					mtid="[MT message ID]" 
					message="[MT message]"
					dateSent="[YYYYMMDD hh:mm:ss]" 
					msidn="[10-digit mobile number]"
					carrier="[mobile carrier]"
					shortCode="[short code]"  
					keywordId="[keyword id]" 
					keywordName="[keyword name]" 
					moid="[ID for MT message if this MT was in response]" 
					moMessage="[MT message if this MT was in response]"  />
					... 
				</messages>
		</apiResponse>


EXAMPLE USAGE:

In this example we will fetch the mobile terminated message with id = 1000. The MTID can be found by using other messaging API calls to query for messages.


REQUEST:

GET http://api.msgme.com/v1/messaging/get_mt_message?token=0e9ace1582fbb754dfe7f4e11f572bf5273f3c69&mtid=1000


RESPONSE:

		<?xml version="1.0" encoding="UTF-8"?>
		<apiResponse status="success" statusCode="200" >
			<messages page="1" numberOfPages="1">
				<mtMessage mtid="1000" 
					parentMtid="" 
					message="Redsox Win!"
					dateSent="20090601 12:22:38" 
					msidn="4159999999" 
					carrier="ATT"
					shortCode="64763"  
					keywordId="12345" 
					keywordName="sports" 
					moid="1231" 
					moMessage="sports"  />
			</messages>
		</apiResponse> 


EXAMPLE USAGE:

In this example we will fetch the mobile terminated messages resulting from the transaction with a particular Message ID (messageId 12345). The Message ID can be obtained by using messaging APIs such as send_message.


REQUEST:

		GET http://api.msgme.com/v1/messaging/get_mt_message?
		token=0e9ace1582fbb754dfe7f4e11f572bf5273f3c69
		&messageId=12345

RESPONSE:

		<?xml version="1.0" encoding="UTF-8"?>
		<apiResponse status="success" statusCode="200" >
			<messages page="1" numberOfPages="1">
				<mtMessage mtid="2000"  
					parentMtid="9999"
					message="Redsox Win!"
					dateSent="20090601 12:22:38" 
					msidn="4159999999" 
					carrier="ATT"
					shortCode="64763"  
					keywordId="12345" 
					keywordName="sports" 
					moid="" 
					moMessage=""  />
				<mtMessage mtid="2001"  
					parentMtid="9999"
					message="Redsox Win!"
					dateSent="20090601 12:22:39" 
					msidn="4158888888" 
					carrier="Sprint"
					shortCode="64763"  
					keywordId="12345" 
					keywordName="sports" 
					moid="" 
					moMessage=""  />
				<mtMessage mtid="2002"  
					parentMtid="9999"
					message="Redsox Win!"
					dateSent="20090601 12:22:40" 
					msidn="4157777777" 
					carrier="ATT"
					shortCode="64763"  
					keywordId="12345" 
					keywordName="sports" 
					moid="" 
					moMessage=""  />
			</messages>
		</apiResponse> 


EXAMPLE USAGE:

In this example we will fetch the mobile terminated messages resulting from the transaction with a particular Parent MTID (parentMtid 9999). The Parent MTID can be found by using other messaging API calls to query for messages.


REQUEST:

GET http://api.msgme.com/v1/messaging/get_mt_message?token=0e9ace1582fbb754dfe7f4e11f572bf5273f3c69 &parentMtid=9999

RESPONSE:

		<?xml version="1.0" encoding="UTF-8"?>
		<apiResponse status="success" statusCode="200" >
			<messages page="1" numberOfPages="1">
				<mtMessage mtid="9000"  
					parentMtid="9999"
					message="Redsox Win!"
					dateSent="20090601 12:22:38" 
					msidn="4159999999" 
					carrier="ATT"
					shortCode="64763"  
					keywordId="12345" 
					keywordName="sports" 
					moid="" 
					moMessage=""  />
				<mtMessage mtid="9001"  
					parentMtid="9999"
					message="Redsox Win!"
					dateSent="20090601 12:22:39" 
					msidn="4158888888" 
					carrier="Sprint"
					shortCode="64763"  
					keywordId="12345" 
					keywordName="sports" 
					moid="" 
					moMessage=""  />
				<mtMessage mtid="9002"  
					parentMtid="9999"
					message="Redsox Win!"
					dateSent="20090601 12:22:40" 
					msidn="4157777777" 
					carrier="ATT"
					shortCode="64763"  
					keywordId="12345" 
					keywordName="sports" 
					moid="" 
					moMessage=""  />
			</messages>
		</apiResponse>