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

# Purge Image CDN cache

> Evict CDN URLs and/or edge cache tags from the Convertly CDN. Requires a standard server-side Convertly API key; delivery keys cannot purge.



## OpenAPI

````yaml /openapi.json post /api/cdn-purge
openapi: 3.1.0
info:
  title: Convertly API
  version: 1.0.0
  description: >-
    Convertly provides production API endpoints for media conversion,
    compression, Image CDN delivery, Forma AI, HLS/DASH video streaming, media
    tools, async jobs, workflows, webhooks, and Convertly Storage.
  license:
    name: Proprietary
    url: https://convertly.sh/terms
servers:
  - url: https://convertly.sh
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /api/cdn-purge:
    post:
      tags:
        - Image CDN
      summary: Purge Image CDN cache
      description: >-
        Evict CDN URLs and/or edge cache tags from the Convertly CDN. Requires a
        standard server-side Convertly API key; delivery keys cannot purge.
      operationId: purgeCdnCache
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                urls:
                  type: array
                  maxItems: 30
                  items:
                    type: string
                    format: uri
                  description: Full CDN URLs to evict (exact match including query string).
                tags:
                  type: array
                  minItems: 1
                  maxItems: 30
                  items:
                    type: string
                    maxLength: 128
                  description: >-
                    Cache-Tag values from CDN responses: `workspace:{userId}`,
                    `asset:{fileId}`, or `origin:{slug}`.
              anyOf:
                - required:
                    - urls
                - required:
                    - tags
      responses:
        '200':
          description: CDN cache purged
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  purged:
                    type: array
                    items:
                      type: string
                      format: uri
                  purgedTags:
                    type: array
                    items:
                      type: string
                required:
                  - ok
                  - purged
                  - purgedTags
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '500':
          $ref: '#/components/responses/Error'
components:
  responses:
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        upgradeUrl:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Dashboard-generated Convertly API key. Keys currently begin with
        `cvly_`.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Alternative API key header for server-side clients.

````