Update a Message resource (used to redact Message `body` text and to cancel not-yet-sent messages)
A Message resource represents an inbound or outbound message.
Update a Message resource (used to redact Message body
text and to cancel not-yet-sent messages)
Path parameters
-
The SID of the Account that created the Message resources to update.
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 updated
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^(SM|MM)[0-9a-fA-F]{32}$
.
POST
/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json
curl \
--request POST 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Body='
Request examples
Redact body
{"Body"=>""}
{"Status"=>"canceled"}
Response examples (200)
Redact body
{
"to": "+18182008801",
"sid": "SMb7c0a2ce80504485a6f653a7110836f5",
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMb7c0a2ce80504485a6f653a7110836f5.json",
"body": "",
"from": "+12019235161",
"tags": {},
"price": null,
"status": "sent",
"date_sent": "Fri, 24 May 2019 17:18:28 +0000",
"direction": "outbound-api",
"num_media": "0",
"error_code": null,
"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": null,
"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"
}
{
"to": "+18182008801",
"sid": "SMb7c0a2ce80504485a6f653a7110836f5",
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMb7c0a2ce80504485a6f653a7110836f5.json",
"body": "Hello World!",
"from": null,
"tags": {},
"price": null,
"status": "canceled",
"date_sent": null,
"direction": "outbound-api",
"num_media": "0",
"error_code": null,
"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 18:18:28 +0000",
"num_segments": "1",
"error_message": null,
"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"
}