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

> Reverse lookup: list the conversations where a given action, instruction, or knowledge base item was used, newest first, with the reply count, ticket number, last message, and usage timestamps.

# List conversations that used a resource



## OpenAPI

````yaml get /resource-usage/{resource_type}/{resource_id}/conversations
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /resource-usage/{resource_type}/{resource_id}/conversations:
    get:
      summary: List conversations that used a resource
      description: >-
        Reverse lookup: list the conversations where a given action,
        instruction, or KB item was used, newest first. Returns one row per
        conversation with the reply count, ticket number, last message, and
        first/last-used timestamps. Defaults to `applied` usage (the resource
        actually fired); pass `usageKind=available` to see where an instruction
        was in context but may not have fired.
      operationId: listResourceConversations
      parameters:
        - schema:
            type: string
            enum:
              - applied
              - available
          in: query
          name: usageKind
          required: false
        - schema: {}
          in: query
          name: from
          required: false
        - schema: {}
          in: query
          name: to
          required: false
        - schema:
            default: 20
            type: integer
            minimum: 1
            maximum: 100
          in: query
          name: limit
          required: false
        - schema:
            default: 0
            type: integer
            minimum: 0
            maximum: 9007199254740991
          in: query
          name: offset
          required: false
        - schema:
            type: string
            enum:
              - action
              - instruction
              - knowledge
          in: path
          name: resource_type
          required: true
        - schema:
            type: string
          in: path
          name: resource_id
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicResourceUsageConversationsDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    PublicResourceUsageConversationsDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/PublicResourceUsageConversationsDto'
      type: object
      properties:
        conversations:
          type: array
          items:
            type: object
            properties:
              session_id:
                type: string
              ticket_number:
                anyOf:
                  - type: number
                  - type: 'null'
                description: Inbox ticket number, if assigned
              last_message:
                anyOf:
                  - type: string
                  - type: 'null'
                description: The conversation’s most recent message
              reply_count:
                type: number
                description: AI replies in this conversation that used the resource
              first_used_at:
                type: string
                description: ISO 8601 timestamp of first use in this conversation
              last_used_at:
                type: string
                description: ISO 8601 timestamp of most recent use
            required:
              - session_id
              - ticket_number
              - last_message
              - reply_count
              - first_used_at
              - last_used_at
            additionalProperties: false
        total_sessions:
          type: number
          description: Distinct conversations matching the lookup
      required:
        - conversations
        - total_sessions
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````