David Prifti
David Prifti

Reputation: 711

Twilio filter messages by their content?

I am trying to use the Twilio API and I would like to use the message content as a filter. So ideallay I would like to make a request like https://api.twilio.com/2010-04-01/Accounts/AccSID/Messages.json?body="test" and it would include all the messages that have the word "test" in their body whether inbound or outbound messages.

In Twilio docs I could only find filtering messages by date sent. Can the above use case be achieved with Twilio?

Upvotes: 1

Views: 1023

Answers (1)

Alan
Alan

Reputation: 10781

There isn't a parameter to filter message body content using the /Messages resource. You can look at the BulkExport API to export the messages to your datastore or capture the logs locally from your Application server upon origination and termination of the message responses and store those in your datastore for later filtering based on your DB logic.

BulkExport API Overview

Best Practices for SMS Message Logging

Upvotes: 2

Related Questions