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

# Refetch Global Ad Library Ads

> Queue throttled ad-info refetches for status-sensitive ad surfaces.



## OpenAPI

````yaml /openapi.json post /api/v1/ad-library/ads/refetch
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/ad-library/ads/refetch:
    post:
      tags:
        - Ad Library
        - Ad Library
      summary: Refetch Global Ad Library Ads
      description: Queue throttled ad-info refetches for status-sensitive ad surfaces.
      operationId: refetch_global_ad_library_ads_api_v1_ad_library_ads_refetch_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdLibraryAdRefetchRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdLibraryAdRefetchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AdLibraryAdRefetchRequest:
      properties:
        ad_ids:
          items:
            type: string
            format: uuid
          type: array
          maxItems: 50
          minItems: 1
          title: Ad Ids
        country:
          anyOf:
            - type: string
              maxLength: 2
              minLength: 2
            - type: 'null'
          title: Country
      type: object
      required:
        - ad_ids
      title: AdLibraryAdRefetchRequest
    AdLibraryAdRefetchResponse:
      properties:
        ads:
          items:
            $ref: '#/components/schemas/AdLibraryAdRefetchItem'
          type: array
          title: Ads
        enqueued:
          type: integer
          title: Enqueued
          default: 0
        throttled:
          type: integer
          title: Throttled
          default: 0
      type: object
      title: AdLibraryAdRefetchResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AdLibraryAdRefetchItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        status:
          type: string
          title: Status
        last_seen_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Seen At
      type: object
      required:
        - id
        - status
      title: AdLibraryAdRefetchItem
    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

````