SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Deleting messages, message media or message bodies

CAUTION: The deletion of messages, message media or message bodies is a final action. Deleted content is non recoverable. Be sure the content is no longer needed before proceeding with any deletion.

You can delete individual records of messages or media associated with messages by using the HTTP DELETE functionality of the API.

  • To delete individual message records through the API, make an HTTP DELETE request to the message resource. This will also delete any media objects associated with that message, assuming those exact same media are not also associated with another message on your account.
  • To delete individual media files associated with MMS messages through the API, make an HTTP DELETE request to the message media resource.

Notice: As of October 14, 2020, deleting the record of a message automatically deletes the media associated with the message as well (if applicable).

Delete message bodies

If you want to remove only the message's body (and keep the actual record of the message), you make an HTTP POST request to the message resource to update the body with an empty string "". For more details, see Update a Message resource (Twilio Docs)

An even better option would be to use Message Redaction, which allows you to protect phone numbers and message bodies by limiting their exposure while still allowing Twilio to deliver your messages globally.

Have more questions? Submit a request
Powered by Zendesk