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

# List content gaps

> List saved content gaps. Optional `favorite_id` scopes results to a product/identity (hybrid filter keeps legacy NULL gaps visible via domain-match).



## OpenAPI

````yaml get /api/agent/gaps
openapi: 3.1.0
info:
  title: Citedy Agent API
  version: 1.0.0
  description: >-
    Public contract for Citedy agent integrations. This contract reflects the
    current /api/agent surface without changing runtime behavior.
  contact:
    name: Citedy Support
    url: https://www.citedy.com
  license:
    name: Proprietary
    url: https://www.citedy.com
servers:
  - url: https://www.citedy.com
security: []
tags:
  - name: Health
    description: Platform and dependency health
  - name: Registration
    description: Agent onboarding and approval
  - name: Agent
    description: Agent identity and key lifecycle
  - name: Scout
    description: Trend scouting endpoints
  - name: Gaps
    description: Content gap analysis
  - name: Autopilot
    description: Article generation and retrieval
  - name: Articles
    description: Queued article generation job polling
  - name: Adaptations
    description: Social adaptation generation
  - name: Sessions
    description: Autopilot recurring sessions
  - name: Lead Magnets
    description: Lead magnet generation and state
  - name: Warm Leads
    description: Warm-lead report generation and export
  - name: Ingest
    description: Content ingestion jobs
  - name: Competitors
    description: Competitor discovery and analysis
  - name: Personas
    description: Writing persona catalog
  - name: Webhooks
    description: Webhook endpoint registration and delivery logs
  - name: Publishing
    description: Social publishing, scheduling and cancellation
  - name: Schedule
    description: Content schedule timeline and gap analysis
  - name: Settings
    description: Agent preferences and configuration
  - name: Scan
    description: Experimental trend scanning (xAI Grok)
  - name: Status
    description: Operational readiness and actionable onboarding status
  - name: Products
    description: Product knowledge base document management
  - name: Shorts
    description: Short-form video generation and polling
  - name: SEO Tools
    description: Agent-authenticated SEO diagnostics tools exposed via MCP seo.* namespace.
  - name: GSC
    description: Google Search Console integration and reporting
paths:
  /api/agent/gaps:
    get:
      tags:
        - Gaps
      summary: List content gaps
      description: >-
        List saved content gaps. Optional `favorite_id` scopes results to a
        product/identity (hybrid filter keeps legacy NULL gaps visible via
        domain-match).
      operationId: listContentGaps
      parameters:
        - in: query
          name: favorite_id
          required: false
          schema:
            type: string
            format: uuid
          description: >-
            Filter to gaps tagged with this favorite. Owner-checked against
            tenant — cross-tenant favorites return 403. The legacy-NULL fallback
            (rows where favorite_id IS NULL but domain matches) is appended only
            when the favorite's domain normalizes successfully; if normalization
            fails, the fallback is dropped and missing legacy gaps may indicate
            an invalid favorite domain rather than a data bug.
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 100
          description: Max items to return.
      responses:
        '200':
          description: List of gaps
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListGapsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - AgentApiKey: []
components:
  schemas:
    ListGapsResponse:
      type: object
      properties:
        gaps:
          type: array
          items:
            $ref: '#/components/schemas/GapItem'
        total_gaps:
          type: integer
        credits_used:
          type: number
      required:
        - gaps
        - total_gaps
        - credits_used
      additionalProperties: false
    GapItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        gap_type:
          type: string
        priority:
          type: string
        opportunity_score:
          type:
            - number
            - 'null'
        status:
          type: string
        description:
          type:
            - string
            - 'null'
        favorite_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Favorite (product identity) ID this gap is scoped to, or null for
            legacy tenant-wide gaps.
        created_at:
          type: string
          format: date-time
      required:
        - title
        - gap_type
        - priority
      additionalProperties: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
      additionalProperties: true
    RateLimitErrorResponse:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          properties:
            retry_after:
              type: integer
          required:
            - retry_after
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    AgentApiKey:
      type: http
      scheme: bearer
      description: Bearer citedy_agent_* key

````