> ## 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 competitor evidence and analytics

> 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/brands/{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/brands/{id}/analytics:
    get:
      tags:
        - Brands
      summary: Read competitor evidence and analytics
      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: getV2BrandsIdAnalytics
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Brand ID (brd_…).
        - name: windowDays
          in: query
          required: false
          schema:
            type: integer
            minimum: 7
            maximum: 180
            default: 30
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      competitor:
                        type: object
                        properties:
                          id:
                            type: number
                          name:
                            type: string
                          label:
                            type: string
                          primaryDomain:
                            type:
                              - string
                              - 'null'
                          isOwnBrand:
                            type: boolean
                          ownBrandConfirmedAt:
                            type:
                              - string
                              - 'null'
                          aliasCount:
                            type: number
                          aliases:
                            type: array
                            items:
                              type: object
                              properties:
                                aliasType:
                                  type: string
                                  enum:
                                    - name
                                    - domain
                                aliasText:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                id:
                                  type: integer
                                  exclusiveMinimum: 0
                                competitorId:
                                  type: integer
                                  exclusiveMinimum: 0
                                normalizedAlias:
                                  type: string
                                createdAt:
                                  type: string
                              required:
                                - aliasType
                                - aliasText
                                - id
                                - competitorId
                                - normalizedAlias
                                - createdAt
                              additionalProperties: false
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                          archivedAt:
                            type:
                              - string
                              - 'null'
                        required:
                          - id
                          - name
                          - label
                          - primaryDomain
                          - isOwnBrand
                          - ownBrandConfirmedAt
                          - aliasCount
                          - aliases
                          - createdAt
                          - updatedAt
                          - archivedAt
                        additionalProperties: false
                      window:
                        type: object
                        properties:
                          days:
                            type: number
                          from:
                            type: string
                          to:
                            type: string
                        required:
                          - days
                          - from
                          - to
                        additionalProperties: false
                      visibility:
                        type: object
                        properties:
                          totalMentions:
                            type: number
                          shareOfVoice:
                            type: number
                          averagePosition:
                            type:
                              - number
                              - 'null'
                          observedAnswerCount:
                            type: number
                          points:
                            type: array
                            items:
                              type: object
                              properties:
                                day:
                                  type: string
                                mentions:
                                  type: number
                                shareOfVoice:
                                  type: number
                              required:
                                - day
                                - mentions
                                - shareOfVoice
                              additionalProperties: false
                        required:
                          - totalMentions
                          - shareOfVoice
                          - averagePosition
                          - observedAnswerCount
                          - points
                        additionalProperties: false
                      sentiment:
                        type: object
                        properties:
                          overview:
                            type: object
                            properties:
                              window:
                                type: object
                                properties:
                                  from:
                                    type: string
                                  to:
                                    type: string
                                  compareFrom:
                                    type:
                                      - string
                                      - 'null'
                                  compareTo:
                                    type:
                                      - string
                                      - 'null'
                                required:
                                  - from
                                  - to
                                  - compareFrom
                                  - compareTo
                                additionalProperties: false
                              generatedAt:
                                type: string
                              summary:
                                type: object
                                properties:
                                  totalMentions:
                                    type: number
                                  distinctRuns:
                                    type: number
                                  positiveCount:
                                    type: number
                                  negativeCount:
                                    type: number
                                  neutralCount:
                                    type: number
                                  mixedCount:
                                    type: number
                                  positiveShare:
                                    type: number
                                  negativeShare:
                                    type: number
                                  netSentiment:
                                    type: number
                                  ownBrandNegativeMentions:
                                    type: number
                                  competitorPositiveMentions:
                                    type: number
                                required:
                                  - totalMentions
                                  - distinctRuns
                                  - positiveCount
                                  - negativeCount
                                  - neutralCount
                                  - mixedCount
                                  - positiveShare
                                  - negativeShare
                                  - netSentiment
                                  - ownBrandNegativeMentions
                                  - competitorPositiveMentions
                                additionalProperties: false
                              comparison:
                                anyOf:
                                  - type: object
                                    properties:
                                      totalMentions:
                                        type: number
                                      distinctRuns:
                                        type: number
                                      positiveCount:
                                        type: number
                                      negativeCount:
                                        type: number
                                      neutralCount:
                                        type: number
                                      mixedCount:
                                        type: number
                                      positiveShare:
                                        type: number
                                      negativeShare:
                                        type: number
                                      netSentiment:
                                        type: number
                                      ownBrandNegativeMentions:
                                        type: number
                                      competitorPositiveMentions:
                                        type: number
                                    required:
                                      - totalMentions
                                      - distinctRuns
                                      - positiveCount
                                      - negativeCount
                                      - neutralCount
                                      - mixedCount
                                      - positiveShare
                                      - negativeShare
                                      - netSentiment
                                      - ownBrandNegativeMentions
                                      - competitorPositiveMentions
                                    additionalProperties: false
                                  - type: 'null'
                            required:
                              - window
                              - generatedAt
                              - summary
                              - comparison
                            additionalProperties: false
                          series:
                            type: array
                            items:
                              type: object
                              properties:
                                bucketDate:
                                  type: string
                                totalMentions:
                                  type: number
                                positiveCount:
                                  type: number
                                negativeCount:
                                  type: number
                                neutralCount:
                                  type: number
                                mixedCount:
                                  type: number
                                ownBrandNegativeMentions:
                                  type: number
                                competitorPositiveMentions:
                                  type: number
                              required:
                                - bucketDate
                                - totalMentions
                                - positiveCount
                                - negativeCount
                                - neutralCount
                                - mixedCount
                                - ownBrandNegativeMentions
                                - competitorPositiveMentions
                              additionalProperties: false
                          evidence:
                            type: array
                            items:
                              type: object
                              properties:
                                mentionId:
                                  type: number
                                promptRunId:
                                  type: number
                                promptId:
                                  type: number
                                promptLabel:
                                  type: string
                                platform:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - chatgpt
                                        - gemini
                                        - perplexity
                                        - claude
                                        - ai_mode
                                        - ai_overview
                                        - google_ai_mode
                                        - google_ai_overview
                                        - unknown
                                    - type: 'null'
                                regionCode:
                                  type:
                                    - string
                                    - 'null'
                                occurredAt:
                                  type:
                                    - string
                                    - 'null'
                                targetLabel:
                                  type: string
                                targetKind:
                                  type: string
                                  enum:
                                    - workspace_brand
                                    - competitor
                                    - other_brand
                                competitorId:
                                  type:
                                    - number
                                    - 'null'
                                isOwnBrand:
                                  type: boolean
                                sentiment:
                                  type: string
                                  enum:
                                    - positive
                                    - negative
                                    - neutral
                                    - mixed
                                aspect:
                                  type:
                                    - string
                                    - 'null'
                                quote:
                                  type: string
                                quoteStart:
                                  type:
                                    - number
                                    - 'null'
                                quoteEnd:
                                  type:
                                    - number
                                    - 'null'
                                excerpt:
                                  type: string
                                excerptHighlightStart:
                                  type: number
                                excerptHighlightEnd:
                                  type: number
                                position:
                                  type: number
                                confidence:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - mentionId
                                - promptRunId
                                - promptId
                                - promptLabel
                                - platform
                                - regionCode
                                - occurredAt
                                - targetLabel
                                - targetKind
                                - competitorId
                                - isOwnBrand
                                - sentiment
                                - aspect
                                - quote
                                - quoteStart
                                - quoteEnd
                                - excerpt
                                - excerptHighlightStart
                                - excerptHighlightEnd
                                - position
                                - confidence
                              additionalProperties: false
                        required:
                          - overview
                          - series
                          - evidence
                        additionalProperties: false
                      sources:
                        type: array
                        items:
                          type: object
                          properties:
                            domain:
                              type: string
                            citationCount:
                              type: number
                            answerCount:
                              type: number
                            lastSeenAt:
                              type:
                                - string
                                - 'null'
                          required:
                            - domain
                            - citationCount
                            - answerCount
                            - lastSeenAt
                          additionalProperties: false
                      groups:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                            name:
                              type: string
                            answerCount:
                              type: number
                            promptCount:
                              type: number
                          required:
                            - id
                            - name
                            - answerCount
                            - promptCount
                          additionalProperties: false
                      answers:
                        type: array
                        items:
                          type: object
                          properties:
                            promptRunId:
                              type: number
                            promptId:
                              type: number
                            promptLabel:
                              type: string
                            platform:
                              type:
                                - string
                                - 'null'
                            regionCode:
                              type:
                                - string
                                - 'null'
                            rank:
                              type:
                                - number
                                - 'null'
                            occurredAt:
                              type:
                                - string
                                - 'null'
                          required:
                            - promptRunId
                            - promptId
                            - promptLabel
                            - platform
                            - regionCode
                            - rank
                            - occurredAt
                          additionalProperties: false
                      generatedAt:
                        type: string
                    required:
                      - competitor
                      - window
                      - visibility
                      - sentiment
                      - sources
                      - groups
                      - answers
                      - generatedAt
                    additionalProperties: false
                required:
                  - 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.

````