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

# Read prompt visibility and comparisons

> Workspace-scoped app capability through the customer API. MCP requires the matching prompts or competitors permission. Competitor writes require current admin permission. Personal review sessions additionally require user-authorized OAuth and are unavailable to workspace service keys. Identity decisions verify the discovered candidate revision and replay by UUID. Review applications report per-item outcomes; inspect conflicts before continuing.



## OpenAPI

````yaml GET /api/v2/prompts/{id}/analytics
openapi: 3.1.1
info:
  title: chatobserver public API
  version: '2026-09-09'
  description: >-
    Track AI visibility, manage prompts, inspect collected answers and
    citations, and integrate workspace data with your own tools. Visibility
    endpoints use workspace API keys. Data endpoints use scoped service-account
    keys; spreadsheet client endpoints use authorised client sessions. See the
    authentication guide for each credential type.
  contact:
    name: chatobserver support
    url: https://chatobserver.com/contact
    email: support@chatobserver.com
servers:
  - url: https://app.chatobserver.com
    description: Production API
security:
  - WorkspaceKey: []
  - BearerKey: []
tags:
  - name: Workspace
    description: Validate access and list the workspace project and available platforms.
  - name: Prompts
    description: Create, schedule, organise, activate and retrieve tracked prompts.
  - name: Answers
    description: Retrieve collected AI answers, their analysis and visibility trends.
  - name: Brands
    description: Manage brands and compare their visibility in AI answers.
  - name: Sources and citations
    description: Analyse cited domains, pages and ownership across answers.
  - name: Visitor analytics
    description: Read website visitor and crawler analytics for the workspace.
  - name: Content opportunities
    description: Retrieve content-gap findings and recommendations for tracked prompts.
  - name: Usage
    description: Read workspace consumption and allowance summaries.
  - name: Data connections
    description: Discover authorised connections, source accounts and connector catalogues.
  - name: Data queries
    description: >-
      Create versioned queries, publish definitions and inspect integration
      contracts.
  - name: Data operations
    description: >-
      Execute, validate, cancel and inspect operations and page through result
      rows.
  - name: Data delivery
    description: Manage schedules, transfers, destinations and import workflows.
  - name: Data definitions
    description: Manage reusable definitions and their immutable versions.
  - name: Data webhooks
    description: >-
      Configure event delivery, inspect deliveries, replay events and rotate
      secrets.
  - name: Client authorisation
    description: Authorise spreadsheet clients using a user-approved challenge exchange.
  - name: Spreadsheet clients
    description: >-
      Access document-bound client sessions, queries, schedules, bindings and
      write claims.
  - name: AI visibility audits
    description: Create website visibility audits and retrieve their report links.
  - name: Version 1
    description: Integrate with the version 1 visibility and analytics endpoints.
paths:
  /api/v2/prompts/{id}/analytics:
    get:
      tags:
        - Prompts
      summary: Read prompt visibility and comparisons
      description: >-
        Workspace-scoped app capability through the customer API. MCP requires
        the matching prompts or competitors permission. Competitor writes
        require current admin permission. Personal review sessions additionally
        require user-authorized OAuth and are unavailable to workspace service
        keys. Identity decisions verify the discovered candidate revision and
        replay by UUID. Review applications report per-item outcomes; inspect
        conflicts before continuing.
      operationId: getV2PromptsIdAnalytics
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Prompt ID (prm_…).
        - name: view
          in: query
          required: true
          schema:
            type: string
            enum:
              - summary
              - trend
              - competitors
              - filters
        - name: from
          in: query
          required: false
          schema:
            type: string
            maxLength: 64
        - name: to
          in: query
          required: false
          schema:
            type: string
            maxLength: 64
        - name: windowDays
          in: query
          required: false
          schema:
            type: integer
            minimum: 7
            maximum: 90
            default: 30
        - name: platform
          in: query
          required: false
          schema:
            enum:
              - chatgpt
              - ai_overview
              - ai_mode
              - gemini
              - perplexity
              - claude
            type: string
        - name: region
          in: query
          required: false
          schema:
            type: string
            maxLength: 64
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 8
            default: 5
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      view:
                        type: string
                        const: summary
                      data:
                        type: object
                        properties:
                          window:
                            type: object
                            properties:
                              from:
                                type: string
                              to:
                                type: string
                              days:
                                type: number
                            required:
                              - from
                              - to
                              - days
                            additionalProperties: false
                          generatedAt:
                            type: string
                          stats:
                            type: object
                            properties:
                              answerCount:
                                type: number
                              presenceRate:
                                type: number
                              firstPlaceRate:
                                type: number
                              ownAverageBestRank:
                                type:
                                  - number
                                  - 'null'
                              bestCompetitorAverageRank:
                                type:
                                  - number
                                  - 'null'
                              deltaPresenceRate:
                                type:
                                  - number
                                  - 'null'
                              deltaFirstPlaceRate:
                                type:
                                  - number
                                  - 'null'
                              deltaOwnAverageBestRank:
                                type:
                                  - number
                                  - 'null'
                              deltaBestCompetitorAverageRank:
                                type:
                                  - number
                                  - 'null'
                              lastAnalyzedRunAt:
                                type:
                                  - string
                                  - 'null'
                            required:
                              - answerCount
                              - presenceRate
                              - firstPlaceRate
                              - ownAverageBestRank
                              - bestCompetitorAverageRank
                              - deltaPresenceRate
                              - deltaFirstPlaceRate
                              - deltaOwnAverageBestRank
                              - deltaBestCompetitorAverageRank
                              - lastAnalyzedRunAt
                            additionalProperties: false
                        required:
                          - window
                          - generatedAt
                          - stats
                        additionalProperties: false
                    required:
                      - view
                      - data
                    additionalProperties: false
                  - type: object
                    properties:
                      view:
                        type: string
                        const: trend
                      data:
                        type: object
                        properties:
                          window:
                            type: object
                            properties:
                              from:
                                type: string
                              to:
                                type: string
                              days:
                                type: number
                            required:
                              - from
                              - to
                              - days
                            additionalProperties: false
                          generatedAt:
                            type: string
                          points:
                            type: array
                            items:
                              type: object
                              properties:
                                bucketDate:
                                  type: string
                                answerCount:
                                  type: number
                                presenceRate:
                                  type: number
                                firstPlaceRate:
                                  type: number
                                ownAverageBestRank:
                                  type:
                                    - number
                                    - 'null'
                                bestCompetitorAverageRank:
                                  type:
                                    - number
                                    - 'null'
                              required:
                                - bucketDate
                                - answerCount
                                - presenceRate
                                - firstPlaceRate
                                - ownAverageBestRank
                                - bestCompetitorAverageRank
                              additionalProperties: false
                        required:
                          - window
                          - generatedAt
                          - points
                        additionalProperties: false
                    required:
                      - view
                      - data
                    additionalProperties: false
                  - type: object
                    properties:
                      view:
                        type: string
                        const: competitors
                      data:
                        type: object
                        properties:
                          window:
                            type: object
                            properties:
                              from:
                                type: string
                              to:
                                type: string
                              days:
                                type: number
                            required:
                              - from
                              - to
                              - days
                            additionalProperties: false
                          generatedAt:
                            type: string
                          competitors:
                            type: array
                            items:
                              type: object
                              properties:
                                competitorId:
                                  type: number
                                label:
                                  type: string
                                answerCount:
                                  type: number
                                avgRank:
                                  type:
                                    - number
                                    - 'null'
                                firstPlaceCount:
                                  type: number
                                deltaAvgRank:
                                  type:
                                    - number
                                    - 'null'
                                points:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      bucketDate:
                                        type: string
                                      answerCount:
                                        type: number
                                      avgRank:
                                        type:
                                          - number
                                          - 'null'
                                      firstPlaceCount:
                                        type: number
                                    required:
                                      - bucketDate
                                      - answerCount
                                      - avgRank
                                      - firstPlaceCount
                                    additionalProperties: false
                              required:
                                - competitorId
                                - label
                                - answerCount
                                - avgRank
                                - firstPlaceCount
                                - deltaAvgRank
                                - points
                              additionalProperties: false
                        required:
                          - window
                          - generatedAt
                          - competitors
                        additionalProperties: false
                    required:
                      - view
                      - data
                    additionalProperties: false
                  - type: object
                    properties:
                      view:
                        type: string
                        const: filters
                      data:
                        type: object
                        properties:
                          window:
                            type: object
                            properties:
                              from:
                                type: string
                              to:
                                type: string
                              days:
                                type: number
                            required:
                              - from
                              - to
                              - days
                            additionalProperties: false
                          refreshedAt:
                            type: string
                          availablePlatforms:
                            type: array
                            items:
                              type: string
                          availableRegions:
                            type: array
                            items:
                              type: string
                          lastAnalyzedRunAt:
                            type:
                              - string
                              - 'null'
                        required:
                          - window
                          - refreshedAt
                          - availablePlatforms
                          - availableRegions
                          - lastAnalyzedRunAt
                        additionalProperties: false
                    required:
                      - view
                      - data
                    additionalProperties: false
        '400':
          description: Invalid request.
        '403':
          description: Scope, role or personal ownership denied.
        '404':
          description: Record not found.
        '409':
          description: Candidate, review revision or retry conflict.
components:
  securitySchemes:
    WorkspaceKey:
      type: apiKey
      in: header
      name: x-chatobserver-key
      description: >-
        A workspace API key. Data endpoints require a service-account key with
        the specified scopes.
    BearerKey:
      type: http
      scheme: bearer
      description: The workspace or service-account API key as a bearer token.

````