> ## Documentation Index
> Fetch the complete documentation index at: https://polyai-mintlify-7055a538.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk delete cached audio entries

> Delete multiple audio cache entries by ID in a single request. Operates best-effort — returns which IDs were successfully deleted and which failed, so partial failures can be retried. Maximum 20 IDs per request.



## OpenAPI

````yaml POST /v1/agents/{agentId}/audio-cache/bulk-delete
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/audio-cache/bulk-delete:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
    post:
      tags:
        - Audio Cache
      summary: Bulk delete cached audio entries
      description: >-
        Delete multiple audio cache entries by ID in a single request. Operates
        best-effort — returns which IDs were successfully deleted and which
        failed, so partial failures can be retried. Maximum 20 IDs per request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDeleteAudioCacheRequest'
      responses:
        '200':
          description: Per-ID delete results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDeleteAudioCacheResponse'
        '400':
          description: Invalid request – `ids` must contain between 1 and 20 entries
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized – missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden – the API key does not have `write` permission on the
            audio cache resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    BulkDeleteAudioCacheRequest:
      type: object
      required:
        - ids
      properties:
        ids:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 20
          description: List of audio cache entry IDs to delete (max 20)
    BulkDeleteAudioCacheResponse:
      type: object
      required:
        - deleted
        - failed
      properties:
        deleted:
          type: array
          items:
            type: string
          description: IDs that were successfully deleted
        failed:
          type: array
          items:
            type: string
          description: IDs that failed to delete
    Error:
      type: object
      description: Standard PolyAI API error envelope.
      required:
        - success
        - error
        - error_id
        - error_code
        - error_message
        - data
      properties:
        success:
          type: boolean
          description: Always false for error responses.
          example: false
        error:
          type: string
          description: Human-readable error message.
        error_id:
          type: string
          description: >-
            Unique request identifier from the X-PolyAI-Correlation-Id header.
            Include this when contacting support.
        error_code:
          type: string
          description: Machine-readable error code in UPPER_SNAKE_CASE.
        error_message:
          type: string
          description: Human-readable error message.
        data:
          nullable: true
          description: Always null for error responses.
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````