Migrating from the SMS Message Search API
The SMS Message Search API is deprecated and will shortly be removed. We encourage users to use the Reports API for this purpose instead.
You can use the Reports API either synchronously or asynchronously to retrieve SMS message records.
Synchronous retrieval
Use this endpoint to retrieve SMS records synchronously, using one of the following approaches:
By message ID: Returns SMS records with the IDs specified in the
id
parameter. To retrieve multiple records, supply a comma-separated list of up to 20 IDs. If any IDs you request are not found they are listed inids_not_found
in the response.By time period: Returns multiple SMS records that were sent in a time window that you specify using the
date_start
anddate_end
parameters, which cannot be more than 24 hours apart. These records are returned in JSON format in batches of up to 1,000 records. If more than 1,000 records match then the response will contain a link to the next batch.
Note: Set the include_message
parameter to true
in the request to return the message text.
See the Get JSON records using the command line tutorial.
Asynchronous retrieval
If you are expecting many thousands of records, you should consider creating a report. This generates a compressed CSV file that contains all matching records. A link to the CSV file is returned in the response.
See either Create a CSV report using the command line or Create a CSV report using a graphical tool.