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

# Purge Cache

> Purges the cache for an application’s subdomain or custom domain, optionally for specific paths.

<ParamField path="app_id" type="string" required>
  The ID of the application to purge the cache for.
</ParamField>

<ParamField body="paths" type="array">
  An optional array of URL paths to purge (e.g., `["https://example.com/path1", "https://example.com/path2"]`). If not provided, the cache for all paths under the application’s subdomain or custom domain is purged.
</ParamField>

### Response

<ResponseExample>
  ```json Response theme={null}
  {}
  ```
</ResponseExample>

### Error Responses

<ResponseField name="code" type="string">
  The error code indicating the reason for failure. Possible values:

  * `UNAUTHORIZED`: The user is not authenticated or lacks sufficient permissions.
  * `UNAUTHORIZED_APP`: The specified application does not exist or does not belong to the user.
  * `NO_AUTHORIZED_PATHS`: None of the provided paths are valid or belong to the application’s subdomain or custom domain.
  * `PURGE_FAILED`: The cache purge operation failed.
</ResponseField>

<ResponseField name="message" type="string">
  A descriptive message providing additional details about the error.
</ResponseField>

<ResponseExample>
  ```json Error Response (403) theme={null}
  {
    "code": "UNAUTHORIZED"
  }
  ```

  ```json Error Response (403) theme={null}
  {
    "code": "UNAUTHORIZED_APP"
  }
  ```

  ```json Error Response (500) theme={null}
  {
    "code": "PURGE_FAILED"
  }
  ```
</ResponseExample>
