List and filter all conversations available to the organization

This operation lists all conversations available to the organization. This is an eventually consistent view and may take a short time before new conversations appear in results.

To iterate through all conversations in the organization, list the first page of conversations (without specifying paginationToken or startFrom). If hasMore=true, the provide the paginationToken to the API to list subsequent pages of conversations until hasMore=false.

Detecting conversations with new messages

Note that the conversations are ordered by created date by default. You can also order them by the time of last activity in the conversation by specifying orderBy=last_message. This is particularly helpful when trying to determine conversations with new activity in them. In this particular case, you can query the list of conversations with orderBy=last_message and capture the lastMessageAt time for the last conversation in the list. On the next query, you can then startFrom=<lastMessageAt time you saved> and orderBy=last_message to return any conversations with new activity since your last query.

While you can determine the conversations with new activity, it is also important to know if the latest messages in each conversation were from your teammates or from an external contact (like a patient). To determine this, you can use the listing of conversation items API to query for the latest items since a particular time with the startFrom field. If any message in the list returned has direction=inbound then it indicates a message received since the last query for message items.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
int32
1 to 200

How many conversations to return at one time (max 200)

string

After fetching a set of conversations, use the returned paginationToken to fetch the next page of conversations. Only one of startFrom or paginationToken can be provided.

string
enum
required

Determines the order of the results. When optionally combined with startFrom, you can get conversationswhere the time that you're ordering by is greater than or equal to the specified start from date. For example, "orderBy": "last_message" and "startFrom": "2025-01-01T00:00:00.000Z" will return conversations with a last message time greater than or equal to January 1, 2025 midnight UTC (useful for fetching delta updates from the last time you fetched).

Allowed:
date-time

Only return conversations whose ordering field value is greater than or equal to this timestamp. Format — RFC 3339 “date-time” (YYYY-MM-DDTHH:mm:ss.SSS±hh:mm). Use Z for UTC or an explicit offset such as -07:00.

  • When orderBy=created, you will receive conversations created greater than or equal to the provided startFrom time.
  • When orderBy=last_message, you will receive conversations with a last message time greater than or equal to the provided startFrom time.
  • Only one of startFrom or paginationToken can be provided.
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json