> ## Documentation Index
> Fetch the complete documentation index at: https://docs.threetone.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Conversation Users

> Get distinct users from conversations with pagination.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/convai/users
openapi: 3.1.0
info:
  title: Threetone API Documentation
  description: >-
    This is the documentation for the Threetone API. You can use this API to use
    our service programmatically with API keys sent in the x-api-key header. You
    can create and manage API keys in the dashboard at
    https://threetone.in/app/developers/api-keys.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/users:
    get:
      tags:
        - Agents Platform
      summary: Get Conversation Users
      description: Get distinct users from conversations with pagination.
      operationId: get_conversation_users_route
      parameters:
        - name: agent_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Agent id (agent_...) or speech engine external id (seng_),
              resolved to the same underlying resource.
            examples:
              - agent_3701k3ttaq12ewp8b7qv5rfyszkz
              - seng_3701k3ttaq12ewp8b7qv5rfyszkz
            title: Agent Id
          description: >-
            Agent id (agent_...) or speech engine external id (seng_), resolved
            to the same underlying resource.
        - name: branch_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter conversations by branch ID.
            title: Branch Id
          description: Filter conversations by branch ID.
        - name: call_start_before_unix
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: >-
              Unix timestamp (in seconds) to filter conversations up to this
              start date.
            title: Call Start Before Unix
          description: >-
            Unix timestamp (in seconds) to filter conversations up to this start
            date.
        - name: call_start_after_unix
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: >-
              Unix timestamp (in seconds) to filter conversations after to this
              start date.
            title: Call Start After Unix
          description: >-
            Unix timestamp (in seconds) to filter conversations after to this
            start date.
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Search/filter by user ID (exact match).
            title: Search
          description: Search/filter by user ID (exact match).
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: How many users to return at maximum. Defaults to 30.
            default: 30
            title: Page Size
          description: How many users to return at maximum. Defaults to 30.
        - name: sort_by
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/UsersSortBy'
            description: >-
              The field to sort the results by. Defaults to
              last_contact_unix_secs.
            default: last_contact_unix_secs
          description: >-
            The field to sort the results by. Defaults to
            last_contact_unix_secs.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Used for fetching next page. Cursor is returned in the response.
            title: Cursor
          description: Used for fetching next page. Cursor is returned in the response.
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetConversationUsersPageResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UsersSortBy:
      type: string
      enum:
        - last_contact_unix_secs
        - conversation_count
      title: UsersSortBy
    GetConversationUsersPageResponseModel:
      properties:
        users:
          items:
            $ref: '#/components/schemas/ConversationUserResponseModel'
          type: array
          title: Users
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - users
        - has_more
      title: GetConversationUsersPageResponseModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ConversationUserResponseModel:
      properties:
        user_id:
          type: string
          title: User Id
        last_contact_unix_secs:
          type: integer
          title: Last Contact Unix Secs
        first_contact_unix_secs:
          type: integer
          title: First Contact Unix Secs
        conversation_count:
          type: integer
          title: Conversation Count
        last_contact_agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Contact Agent Id
        last_contact_conversation_id:
          type: string
          title: Last Contact Conversation Id
        last_contact_agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Contact Agent Name
        sentiment:
          $ref: '#/components/schemas/SentimentAggregate'
        most_frustrated_conversations:
          items:
            $ref: '#/components/schemas/FrustratedConversationRef'
          type: array
          title: Most Frustrated Conversations
      type: object
      required:
        - user_id
        - last_contact_unix_secs
        - first_contact_unix_secs
        - conversation_count
        - last_contact_conversation_id
        - sentiment
      title: ConversationUserResponseModel
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SentimentAggregate:
      properties:
        scored_conversation_count:
          type: integer
          title: Scored Conversation Count
        positive_count:
          type: integer
          title: Positive Count
        neutral_count:
          type: integer
          title: Neutral Count
        negative_count:
          type: integer
          title: Negative Count
        average_sentiment_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Average Sentiment Score
        average_frustration_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Average Frustration Score
      type: object
      required:
        - scored_conversation_count
        - positive_count
        - neutral_count
        - negative_count
        - average_sentiment_score
        - average_frustration_score
      title: SentimentAggregate
    FrustratedConversationRef:
      properties:
        conversation_id:
          type: string
          title: Conversation Id
        agent_id:
          type: string
          title: Agent Id
        start_time_unix_secs:
          type: integer
          title: Start Time Unix Secs
        overall_label:
          type: string
          enum:
            - positive
            - neutral
            - negative
          title: Overall Label
        overall_sentiment_score:
          type: number
          title: Overall Sentiment Score
        overall_frustration_score:
          type: number
          title: Overall Frustration Score
      type: object
      required:
        - conversation_id
        - agent_id
        - start_time_unix_secs
        - overall_label
        - overall_sentiment_score
        - overall_frustration_score
      title: FrustratedConversationRef

````