https://retellai.com/?utm_source=discord&utm_medium=seo logo
my app can no longer retrieve sms data from a "Las...
# ❓・ai-evy-support
c
@AI Evy my app can no longer retrieve sms data from a "Last Month" filter its only 101 records but it returns 0 records can you assist with this?
a
Thanks for tagging me @clientele. I'll look through relevant sources and get back to you shortly.
### Answer --- I don't have specific documentation on an SMS-specific "List" API endpoint with date filtering parameters in the available sources. The sources show the
client.call.list()
method for listing calls [(1) ]() , but there isn't equivalent documentation for listing SMS/chat records with date filters. A few things to check: 1. Chat History — Chat History tracking is available for SMS conversations [(2) ]() , so you should be able to retrieve past SMS data. 2. Analytics Dashboard — Analytics data is updated in real-time and you can use global date range filters to analyze data across different time periods [(3) ]() . This might be an alternative way to view your SMS records. Could you share: - Which API endpoint or method you're using to retrieve the SMS data? - How you're implementing the "Last Month" filter (query parameters, SDK method, etc.) ? This will help narrow down whether it's a filtering issue, an API change, or something else. Check out these potentially useful sources: - [Get analytics insight]() - [Send & receive SMS]() - [Create Outbound SMS]()
​ To learn more, see the sources I considered: [[1] List Calls](https://docs.retellai.com/api-references/list-calls) [[2] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) [[3] Get analytics insight](https://docs.retellai.com/features/analytics-dashboard) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy SMS Data Retrieval Implementation 1. API Endpoint / Method The SMS page uses the Retell AI Chat API to retrieve SMS data. Here's the flow: Component Method/Endpoint Primary API POST /v2/list-chat (Retell AI) Fallback API GET /list-chat (older Retell endpoint, limited to 50 chats) Service Method retellService.getChatHistoryByDateRange(startDate, endDate, options) The data is fetched in SMSPage.tsx (line 1111) : typescript allChatsResponse = await retellService.getChatHistoryByDateRange(start, end, { limit: 2000, // Increased limit to handle full year range data sort_order: 'descending' }) 2. "Last Month" Filter Implementation The "Last Month" filter is implemented in the DateRangePicker.tsx component, specifically in the getDateRangeFromSelection utility function (lines 244-249): typescript case 'lastMonth': const startOfLastMonth = new Date(today.getFullYear(), today.getMonth() - 1, 1) startOfLastMonth.setHours(0, 0, 0, 0) const endOfLastMonth = new Date(today.getFullYear(), today.getMonth(), 0) endOfLastMonth.setHours(23, 59, 59, 999) return { start: startOfLastMonth, end: endOfLastMonth } How it works: Start date: First day of the previous month at 00:00:00.000 End date: Last day of the previous month at 23:59:59.999 (using day 0 of current month gives the last day of previous month) Filter Application Flow: User selects "Last Month" from the DateRangePicker dropdown getDateRangeFromSelection('lastMonth') calculates the date range retellService.getChatHistoryByDateRange() is called with: typescript { start_timestamp: { gte: Math.floor(startDate.getTime() / 1000), // Unix timestamp (seconds) lte: Math.floor(endDate.getTime() / 1000) } } These timestamps populate filter_criteria.start_timestamp in the API request body Example for December 2025: ): })
a
Thanks for the follow-up, @clientele. I'll get back to you soon.
### Answer Based on the documentation I have available, the List Chat endpoint (
GET /list-chat
) does not show any date filtering parameters like
start_timestamp
,
filter_criteria
, or similar query parameters. [(1) ]() The documented usage is simply:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponses = await client.chat.list() ;
console.log(chatResponses) ;
Key observations: 1. No documented date filtering — The List Chat API reference only shows basic retrieval without filter parameters. 2. Timestamps are response fields, not query parameters — The
start_timestamp
and
end_timestamp
fields appear in the response object, not as documented request parameters. 3. Known issue with empty arrays — There was a reported issue where the List Chat endpoint returned empty arrays despite active chats being present, which was subsequently fixed. [(2) ]() Recommendations: - Verify you're using the correct endpoint — the documented endpoint is
GET /list-chat
, not
POST /v2/list-chat
. [(1) ]() - If you need date-based filtering, you may need to retrieve all chats and filter client-side, or use the Get Chat endpoint with specific
chat_id
values if you have them. [(3) ]() - If the
POST /v2/list-chat
endpoint with
filter_criteria
parameters exists, it may not be publicly documented in the sources I have access to. I'd recommend reaching out to Retell AI support directly for clarification on date-filtered chat listing: - [Contact Sales]() - [GitHub]()
​ To learn more, see the sources I considered: [[1] List Chat](https://docs.retellai.com/api-references/list-chat) [[2] List Chat endpoint returning empty array despite active chats present](https://discord.com/channels/1186424376300679209/1382021519781134407) [[3] Get Chat](https://docs.retellai.com/api-references/get-chat) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @clientele. I'll get back to you soon.
c
@AI Evy is there a 50 record return limit using the sms api?
a
### Answer I don't have specific documentation for the List Chat/SMS API endpoint in my available sources to confirm the exact default limit for SMS records. However, I can share what's documented for similar list endpoints: - **List Calls API**: Default limit is 50, max 1000. To retrieve more than 1000, use
pagination_key
to continue fetching the next page. [(1) ]() - **List Chat Agents API**: Also supports
pagination_key
and
pagination_key_version
parameters for pagination. [(2) ]() A community member also confirmed that without using pagination, you're limited to approximately 1000 calls on the List Calls endpoint. [(3) ]() Recommendation: If the List Chat/SMS API follows the same pattern as List Calls, you likely need to implement pagination using
pagination_key
. The typical approach is: 1. First request: no pagination key 2. Subsequent requests: provide the last
chat_id
from the previous result as the
pagination_key
For definitive confirmation on SMS-specific limits and filtering parameters, I'd recommend: - [Contact Sales]() - [GitHub]()
​ To learn more, see the sources I considered: [[1] List Calls](https://docs.retellai.com/api-references/list-calls) [[2] List Chat Agents](https://docs.retellai.com/api-references/list-chat-agents) [[3] HI,, is there any limits on api...](https://discord.com/channels/1186424376300679209/1328940416594083972) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.