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

# Delete Ad Library Ads

> Delete ad-library ads by id or ad-library URL (admin-only).

Accepts a mix of raw ad ids and ``/ad-library/ads/<id>`` URLs. Deleting an
ad cascades to its creatives/assets/observations at the DB level.



## OpenAPI

````yaml /openapi.json post /api/v1/admin/integrations/meta-ad-library/ads/delete
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/admin/integrations/meta-ad-library/ads/delete:
    post:
      tags:
        - Admin
      summary: Delete Ad Library Ads
      description: >-
        Delete ad-library ads by id or ad-library URL (admin-only).


        Accepts a mix of raw ad ids and ``/ad-library/ads/<id>`` URLs. Deleting
        an

        ad cascades to its creatives/assets/observations at the DB level.
      operationId: >-
        delete_ad_library_ads_api_v1_admin_integrations_meta_ad_library_ads_delete_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdminAdLibraryDeleteAdsRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminAdLibraryDeleteAdsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    AdminAdLibraryDeleteAdsRequest:
      properties:
        entries:
          items:
            type: string
          type: array
          maxItems: 5000
          title: Entries
      type: object
      title: AdminAdLibraryDeleteAdsRequest
    AdminAdLibraryDeleteAdsResponse:
      properties:
        requested:
          type: integer
          title: Requested
        deleted:
          type: integer
          title: Deleted
        not_found:
          type: integer
          title: Not Found
        invalid:
          items:
            type: string
          type: array
          title: Invalid
        provider_payloads_deleted:
          type: integer
          title: Provider Payloads Deleted
          default: 0
        storage_objects_deleted:
          type: integer
          title: Storage Objects Deleted
          default: 0
        storage_objects_pending:
          type: integer
          title: Storage Objects Pending
          default: 0
        shared_storage_objects_preserved:
          type: integer
          title: Shared Storage Objects Preserved
          default: 0
        ingestion_runs_deleted:
          type: integer
          title: Ingestion Runs Deleted
          default: 0
        top_ad_references_removed:
          type: integer
          title: Top Ad References Removed
          default: 0
      type: object
      required:
        - requested
        - deleted
        - not_found
      title: AdminAdLibraryDeleteAdsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````