Query all conversations that have a transcript

I am building an application that requires the ability to pull any conversations that have a communication transcript URL associated with them, but I am running into the issue that the SpeechAndTextAnalytics API does not have a query endpoint where I can search by interval and whether or not a transcript URL exists.

The ideal goal is to get details on all the calls in the last X hours which have a transcript, though the only way I can tell to do this right now is by querying the conversations API (conversationsAPI: postAnalyticsConversationsDetailsQuery), performing a GET on each conversationId (conversationsAPI: getConversation), then with the communicationId from that conversation, fetching the transcript URL (speechTextAnalyticsAPI: getSpeechandtextanalyticsConversationCommunicationTranscripturl).

This seems like an overkill way to get a list of transcripts for the last X hours, is there a better way to do it?

Hello,

Not that I have used this API Endpoint myself. But did you have a look at the transcript search endpoint?
It appears you can define a start/end times for the conversationStartTime.
See the example here.

Regards,

Thanks for the response @Jerome.Saint-Marc . It seems like even giving a simple POST request like:

{
                types: ["transcripts"],
                returnFields: ["conversationId", "communicationId"],
                query: [
                    {
                        type: "DATE_RANGE",
                        fields: ["conversationStartTime"],
                        startValue: "2025-02-06T00:00:00.000Z",
                        endValue: "2020-02-07T00:00:00.000Z",
                        dateFormat: "yyyy-MM-dd'T'HH:mm:ss.SSSX",
                    },
                ],
            }

yields the following error:

{
  message: 'BAD_REQUEST',
  code: 'bad.request',
  status: 400,
  messageParams: {},
  contextId: '7660fb48-8a79-42da-9df8-4ea00f653a4c',
  details: [ { errorCode: 'BAD_SEARCH_REQUEST', fieldName: 'searchCriteria' } ],
  errors: []
}

I read in a different thread you responded in that my organization needs access to the endpoint, is this still true even though it seems the transcript search API is no longer a Preview API? Thank you!

Hello,

I don't know which request you are using/trying.
The API endpoint I was referring to is POST /api/v2/speechandtextanalytics/transcripts/search

The thread you have referenced has nothing to do with transcripts. It is about a different endpoint - "/api/v2/conversations/participants/attributes/search" as written in this thread.

Using POST /api/v2/speechandtextanalytics/transcripts/search, I have just tried this body and it gets a response:

{
    "types": [
        "transcripts"
    ],
    "returnFields": [
        "conversationId",
        "communicationId"
    ],
    "query": [
        {
            "type": "DATE_RANGE",
            "fields": [
                "conversationStartTime"
            ],
            "startValue": "2025-02-06T00:00:00.000Z",
            "endValue": "2020-02-07T00:00:00.000Z",
            "dateFormat": "yyyy-MM-dd'T'HH:mm:ss.SSSX"
        }
    ]
}

Here is the link to the endpoint in API Explorer with data set.

Regards,