> ## 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.

> Find who to enroll from a natural-language ask, matched against what customers actually said in recent sessions. Returns candidate people with evidence, no fit judgment.

# Semantic audience discovery — match a natural-language ask against what customers actually said, returning candidate people + evidence



## OpenAPI

````yaml post /sequences/discovery/search
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: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /sequences/discovery/search:
    post:
      summary: >-
        Semantic audience discovery — match a natural-language ask against what
        customers actually said, returning candidate people + evidence
      operationId: discoverSequenceContacts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscoverCampaignPeopleDto'
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoverCampaignPeopleResponseDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    DiscoverCampaignPeopleDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/DiscoverCampaignPeopleDtoInput'
      type: object
      properties:
        query:
          type: string
          minLength: 3
          maxLength: 500
        since:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        max_insights:
          type: integer
          minimum: 1
          maximum: 50
        max_people:
          type: integer
          minimum: 1
          maximum: 5000
        min_similarity:
          type: number
          minimum: 0
          maximum: 1
      required:
        - query
    DiscoverCampaignPeopleResponseDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/DiscoverCampaignPeopleResponseDto'
      type: object
      properties:
        insights:
          type: array
          items:
            type: object
            properties:
              insight_id:
                type: string
              content:
                type: string
              sentiment:
                type: string
              similarity:
                type: number
              occurrence_count:
                type: number
              session_count_in_window:
                type: number
              people_count_in_window:
                type: number
              first_seen_at:
                anyOf:
                  - type: string
                  - type: 'null'
              last_seen_at:
                anyOf:
                  - type: string
                  - type: 'null'
              resolved_at:
                anyOf:
                  - type: string
                  - type: 'null'
            required:
              - insight_id
              - content
              - sentiment
              - similarity
              - occurrence_count
              - session_count_in_window
              - people_count_in_window
              - first_seen_at
              - last_seen_at
              - resolved_at
            additionalProperties: false
        people:
          type: array
          items:
            type: object
            properties:
              contact_id:
                type: string
              name:
                anyOf:
                  - type: string
                  - type: 'null'
              phone_normalized:
                type: string
              email_normalized:
                type: string
              whatsapp_user_id:
                type: string
              unsubscribed:
                type: boolean
              last_session_at:
                anyOf:
                  - type: string
                  - type: 'null'
              csat_last:
                anyOf:
                  - type: number
                  - type: 'null'
              matched:
                type: array
                items:
                  type: object
                  properties:
                    insight_id:
                      type: string
                    session_ids:
                      type: array
                      items:
                        type: string
                    session_count:
                      type: number
                    resolved_session_count:
                      type: number
                    last_session_at:
                      type: string
                  required:
                    - insight_id
                    - session_ids
                    - session_count
                    - resolved_session_count
                    - last_session_at
                  additionalProperties: false
            required:
              - contact_id
              - name
              - phone_normalized
              - email_normalized
              - whatsapp_user_id
              - unsubscribed
              - last_session_at
              - csat_last
              - matched
            additionalProperties: false
        total_people:
          type: number
        truncated:
          type: boolean
        since:
          type: string
      required:
        - insights
        - people
        - total_people
        - truncated
        - since
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````