> ## 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.

# Repair Ad Library Brands

> Repair wrong-or-missing brand data (domain / Facebook page name).

Accepts a mix of raw advertiser ids and ``/ad-library/advertisers/<id>``
URLs. Each brand is repaired and committed independently; the per-brand
``log`` lines record where each value was found (or why nothing was saved)
for the admin Repair log panel. Facebook repair also queues the existing
advertiser-enrichment worker for found brands through the normal Brand
Intelligence identity path, allowing known Instagram profiles to be
captured out of band.



## OpenAPI

````yaml /openapi.json post /api/v1/admin/integrations/meta-ad-library/brands/repair
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/admin/integrations/meta-ad-library/brands/repair:
    post:
      tags:
        - Admin
      summary: Repair Ad Library Brands
      description: >-
        Repair wrong-or-missing brand data (domain / Facebook page name).


        Accepts a mix of raw advertiser ids and ``/ad-library/advertisers/<id>``

        URLs. Each brand is repaired and committed independently; the per-brand

        ``log`` lines record where each value was found (or why nothing was
        saved)

        for the admin Repair log panel. Facebook repair also queues the existing

        advertiser-enrichment worker for found brands through the normal Brand

        Intelligence identity path, allowing known Instagram profiles to be

        captured out of band.
      operationId: >-
        repair_ad_library_brands_api_v1_admin_integrations_meta_ad_library_brands_repair_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminAdLibraryBrandRepairRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminAdLibraryBrandRepairResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AdminAdLibraryBrandRepairRequest:
      properties:
        entries:
          items:
            type: string
          type: array
          maxItems: 200
          title: Entries
        repair_domain:
          type: boolean
          title: Repair Domain
          default: false
        repair_facebook_page_name:
          type: boolean
          title: Repair Facebook Page Name
          default: false
      type: object
      title: AdminAdLibraryBrandRepairRequest
    AdminAdLibraryBrandRepairResponse:
      properties:
        requested:
          type: integer
          title: Requested
        invalid:
          items:
            type: string
          type: array
          title: Invalid
        results:
          items:
            $ref: '#/components/schemas/AdminAdLibraryBrandRepairResult'
          type: array
          title: Results
      type: object
      required:
        - requested
      title: AdminAdLibraryBrandRepairResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AdminAdLibraryBrandRepairResult:
      properties:
        advertiser_id:
          type: string
          format: uuid
          title: Advertiser Id
        canonical_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Canonical Name
        found:
          type: boolean
          title: Found
          default: true
        log:
          items:
            type: string
          type: array
          title: Log
        domain_found:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain Found
        domain_source:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain Source
        domain_saved:
          type: boolean
          title: Domain Saved
          default: false
        merged_into_advertiser_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Merged Into Advertiser Id
        facebook_page_name_found:
          anyOf:
            - type: string
            - type: 'null'
          title: Facebook Page Name Found
        facebook_page_name_saved:
          type: boolean
          title: Facebook Page Name Saved
          default: false
      type: object
      required:
        - advertiser_id
      title: AdminAdLibraryBrandRepairResult
    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

````