Docs

Get message info

/accounts/{accountSID}/messages/{messageSID}

Overview

This function gets the details of the message by its identifier.

Request example

The following cURL example demonstrates getting information on the specified message.

curl –X GET ‘https://api.apico.net/v2/accounts/{accountSID}/messages/{messageSID}’\
-u {accountSID}:{authToken}

Response example

   {
   "message_id":"565c4f9834abc76343b8c9a3",
   "created":"2015-Oct-21 01:31:04+00:00"
   "account_sid":null,
   "to":"35315313424",
   "from":"883140776501697",
   "text":"It’s my first SMS sent via Apico API!",
   "price":null,
   "direction":"outbound",
   "status":"delivered",
}

Response parameters

Parameter

Description

message_sid

Unique message identifier.

created

Message creation date.

account_sid

Account identifier.

to

Recipient’s phone number.

from

Sender’s phone number.

text

Message text.

price

The cost of sending the message (in USD cents).

direction

Message direction.

Either inbound or outbound.

status

The current message status.

One of the following: queued, sent, received, delivered, failed.

status_message

Error details.

Sent only if the status value is failed.