---
title: "POST /realtime-contact-analysis/analysis-segments"
method: POST
path: "/realtime-contact-analysis/analysis-segments"
---

# POST /realtime-contact-analysis/analysis-segments

`POST /realtime-contact-analysis/analysis-segments`

Provides a list of analysis segments for a real-time analysis session.

## Query parameters

- `MaxResults` string
- `NextToken` string

## Request body

- object
  - `InstanceId` string, required — The identifier of the Amazon Connect instance.
  - `ContactId` string, required — The identifier of the contact.
  - `MaxResults` integer — The maximimum number of results to return per page.
  - `NextToken` string — The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

## Response `200`

Success

- ListRealtimeContactAnalysisSegmentsResponse
  - `Segments` RealtimeContactAnalysisSegment[], required — An analyzed transcript or category.
    - `Transcript` object — The analyzed transcript.
      - `Id` string, required — The identifier of the transcript.
      - `ParticipantId` string, required — The identifier of the participant.
      - `ParticipantRole` string, required — The role of participant. For example, is it a customer, agent, or system.
      - `Content` string, required — The content of the transcript.
      - `BeginOffsetMillis` integer, required — The beginning offset in the contact for this transcript.
      - `EndOffsetMillis` integer, required — The end offset in the contact for this transcript.
      - `Sentiment` 'POSITIVE' | 'NEUTRAL' | 'NEGATIVE', required — The sentiment of the detected for this piece of transcript.
      - `IssuesDetected` IssueDetected[] — List of positions where issues were detected on the transcript.
        - `CharacterOffsets` object, required — The offset for when the issue was detected in the segment.
          - `BeginOffsetChar` integer, required — The beginning of the issue.
          - `EndOffsetChar` integer, required — The end of the issue.
    - `Categories` object — The matched category rules.
      - `MatchedCategories` CategoryName[], required — The category rules that have been matched in the analyzed segment.
      - `MatchedDetails` object, required — The category rule that was matched and when it occurred in the transcript.
  - `NextToken` string — <p>If there are additional results, this is the token for the next set of results. If response includes <code>nextToken</code> there are two possible scenarios:</p> <ul> <li> <p>There are more segments so another call is required to get them.</p> </li> <li> <p>There are no more segments at this time, but more may be available later (real-time analysis is in progress) so the client should call the operation again to get new segments.</p> </li> </ul> <p>If response does not include <code>nextToken</code>, the analysis is completed (successfully or failed) and there are no more segments to retrieve.</p>

## Other responses

- `480` — InvalidRequestException
- `481` — AccessDeniedException
- `482` — ResourceNotFoundException
- `483` — InternalServiceException
- `484` — ThrottlingException

---

[API](https://skmtc.net/aws/apis/connect-contact-lens.md) · [All operations](https://skmtc.net/aws/apis/connect-contact-lens/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/connect-contact-lens/versions/fa53c45f61ec/schema)
