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

# Track a competitor directly



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/brands/{brand_id}/competitors
openapi: 3.0.1
info:
  title: Cognizo Public API
  version: v1
  description: >-
    Public REST API for Cognizo. Authenticate with an API key via the
    `X-API-KEY` header.
servers:
  - url: https://core.cognizo.ai
security:
  - apiKey: []
paths:
  /api/v2/brands/{brand_id}/competitors:
    parameters:
      - name: brand_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Competitors
      summary: Track a competitor directly
      operationId: create_brand_competitor
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                domain:
                  type: string
                found_brand_id:
                  type: string
                  format: uuid
                  nullable: true
                first_time_competitor:
                  type: boolean
              required:
                - name
                - domain
      responses:
        '200':
          description: >-
            tracked (upserts competitor by name, creates brand mapping, queues
            visibility aggregation)
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                      domain:
                        type: string
                        nullable: true
                      visibility:
                        type: number
                    required:
                      - id
                      - name
                      - domain
                      - visibility
                required:
                  - data
        '400':
          description: missing required field
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: array
              items:
                $ref: '#/components/schemas/error_detail'
          required:
            - code
            - message
      required:
        - error
    error_detail:
      type: object
      properties:
        field:
          type: string
          nullable: true
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
        - field
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````