Fetch a specific Message
A Message resource represents an inbound or outbound message.
Fetch a specific Message
Path parameters
-
The SID of the Account associated with the Message resource
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^AC[0-9a-fA-F]{32}$
. -
The SID of the Message resource to be fetched
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^(SM|MM)[0-9a-fA-F]{32}$
.
GET
/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json
curl \
--request GET 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json' \
--user "username:password"
Response examples (200)
{
"to": "+18182008801",
"sid": "SMb7c0a2ce80504485a6f653a7110836f5",
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMb7c0a2ce80504485a6f653a7110836f5.json",
"body": "testing",
"from": "+12019235161",
"tags": {
"message_type": "cart_abandoned",
"campaign_name": "Spring Sale 2022"
},
"price": "-0.00750",
"status": "sent",
"date_sent": "Fri, 24 May 2019 17:18:28 +0000",
"direction": "outbound-api",
"num_media": "0",
"error_code": 30007,
"price_unit": "USD",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"api_version": "2010-04-01",
"date_created": "Fri, 24 May 2019 17:18:27 +0000",
"date_updated": "Fri, 24 May 2019 17:18:28 +0000",
"num_segments": "1",
"error_message": "Carrier violation",
"subresource_uris": {
"media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMb7c0a2ce80504485a6f653a7110836f5/Media.json",
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMb7c0a2ce80504485a6f653a7110836f5/Feedback.json"
},
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}