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

# Refresh Brand Intelligence Watchlist Route

> Enqueue public-ad ingestion for a brand's watched advertisers.

Guardrails (2026-07-05 Metapi-burn incident): every provider fetch spends
credits even when every returned ad is already in the library, so
user-initiated refreshes are throttled per brand
(``brand_intel_refresh_min_interval_hours``), capped per advertiser
(``brand_intel_refresh_tracked_limit``), and scoped to advertisers still
tracked by a live competitor. Admins (ADMIN_EMAILS) bypass all three; bulk
library freshness is the nightly cron's job
(``scripts/nightly_ad_library_refresh.py``).



## OpenAPI

````yaml /openapi.json post /api/v1/brands/{brand_id}/brand-intelligence/refresh
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/brands/{brand_id}/brand-intelligence/refresh:
    post:
      tags:
        - Brand Intelligence
        - Brand Intelligence
      summary: Refresh Brand Intelligence Watchlist Route
      description: >-
        Enqueue public-ad ingestion for a brand's watched advertisers.


        Guardrails (2026-07-05 Metapi-burn incident): every provider fetch
        spends

        credits even when every returned ad is already in the library, so

        user-initiated refreshes are throttled per brand

        (``brand_intel_refresh_min_interval_hours``), capped per advertiser

        (``brand_intel_refresh_tracked_limit``), and scoped to advertisers still

        tracked by a live competitor. Admins (ADMIN_EMAILS) bypass all three;
        bulk

        library freshness is the nightly cron's job

        (``scripts/nightly_ad_library_refresh.py``).
      operationId: >-
        refresh_brand_intelligence_watchlist_route_api_v1_brands__brand_id__brand_intelligence_refresh_post
      parameters:
        - name: brand_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Brand Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/BrandIntelligenceRefreshRequest'
                - type: 'null'
              title: Request
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandIntelligenceRefreshResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BrandIntelligenceRefreshRequest:
      properties:
        provider:
          type: string
          maxLength: 80
          minLength: 1
          title: Provider
          default: meta_official
        watchlist_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Watchlist Id
        advertiser_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Advertiser Id
        country:
          anyOf:
            - type: string
              maxLength: 8
              minLength: 1
            - type: 'null'
          title: Country
        platform:
          anyOf:
            - type: string
              maxLength: 40
              minLength: 1
            - type: 'null'
          title: Platform
        limit:
          type: integer
          maximum: 100
          minimum: 1
          title: Limit
          default: 20
      type: object
      title: BrandIntelligenceRefreshRequest
    BrandIntelligenceRefreshResponse:
      properties:
        brand_id:
          type: string
          format: uuid
          title: Brand Id
        requested_at:
          type: string
          format: date-time
          title: Requested At
        provider:
          type: string
          title: Provider
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        platform:
          anyOf:
            - type: string
            - type: 'null'
          title: Platform
        limit:
          type: integer
          title: Limit
        enqueued:
          type: integer
          title: Enqueued
          default: 0
        skipped:
          type: integer
          title: Skipped
          default: 0
        already_running:
          type: integer
          title: Already Running
          default: 0
        jobs:
          items:
            $ref: '#/components/schemas/BrandIntelligenceRefreshJob'
          type: array
          title: Jobs
        skipped_items:
          items:
            $ref: '#/components/schemas/BrandIntelligenceRefreshSkippedItem'
          type: array
          title: Skipped Items
      type: object
      required:
        - brand_id
        - requested_at
        - provider
        - limit
      title: BrandIntelligenceRefreshResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BrandIntelligenceRefreshJob:
      properties:
        job_id:
          type: string
          title: Job Id
        watchlist_id:
          type: string
          format: uuid
          title: Watchlist Id
        watchlist_item_id:
          type: string
          format: uuid
          title: Watchlist Item Id
        advertiser_id:
          type: string
          format: uuid
          title: Advertiser Id
        source_account_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Account Id
        advertiser_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Advertiser Name
        advertiser_domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Advertiser Domain
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        already_running:
          type: boolean
          title: Already Running
          default: false
      type: object
      required:
        - job_id
        - watchlist_id
        - watchlist_item_id
        - advertiser_id
      title: BrandIntelligenceRefreshJob
    BrandIntelligenceRefreshSkippedItem:
      properties:
        watchlist_id:
          type: string
          format: uuid
          title: Watchlist Id
        watchlist_item_id:
          type: string
          format: uuid
          title: Watchlist Item Id
        advertiser_id:
          type: string
          format: uuid
          title: Advertiser Id
        source_account_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Account Id
        reason:
          type: string
          title: Reason
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
      type: object
      required:
        - watchlist_id
        - watchlist_item_id
        - advertiser_id
        - reason
      title: BrandIntelligenceRefreshSkippedItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````