Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,78 +1,66 @@
---
pcx_content_type: troubleshooting
title: Disable Auto Minify
title: Turn off Auto Minify via API
sidebar:
label: Turn off Auto Minify
---

If your site is still using deprecated features for [Auto Minify](/fundamentals/api/reference/deprecations/#auto-minify), disable Auto Minify via the Cloudflare dashboard or API.
If your site is still using deprecated features for [Auto Minify](/fundamentals/api/reference/deprecations/#2024-08-05), turn off Auto Minify via API.

## Dashboard
## Before you begin

To disable Auto Minify via the Cloudflare dashboard:
You will need an [API token](/fundamentals/api/get-started/create-token/) with the following permissions:

1. Log into the [Cloudflare Dashboard](https://dash.cloudflare.com).
2. Go to **Speed** > **Optimization**.
3. Go to **Content Optimization**.
4. For **Auto Minify**, deselect all options.
- _Zone_ > _Zone Settings_ > _Edit_
- _Zone_ > _Zone Settings_ > _Read_

## API
## (Optional) Check zone status

### Before you begin
To check your zone's Auto Minify status, send a `GET` request to the `/zones/{zone_id}/settings/minify` endpoint.

You will need:

- An [API token](/fundamentals/api/get-started/create-token/) with the following permissions:
- `Zone - Zone Settings - Edit`
- `Zone - Zone Settings - Read`

### (Optional) Check zone status

To check your zone's Auto Minify status, send a `GET` request to the `/zones/<ZONE_ID>/settings/minify` endpoint.

```sh title="cURL example"
curl 'https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/settings/minify' \
--header "Authorization: Bearer <CF_API_TOKEN>" \
--header "Content-Type: application/json"
```bash
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/settings/minify" \
--header "Authorization: Bearer <API_TOKEN>"
```

You will get the following response. If any of the values in the highlighted line are `"on"`, then you need to disable them.

```json title="Example response" {4}
```json output {4}
{
"result": {
"id": "minify",
"value": { "css": "off", "html": "off", "js": "off" },
"modified_on": null,
"editable": true
},
"success": true,
"errors": [],
"messages": []
"result": {
"id": "minify",
"value": { "css": "off", "html": "off", "js": "off" },
"modified_on": null,
"editable": true
},
"success": true,
"errors": [],
"messages": []
}
```

### Disable with the API
If any of the values in the highlighted line are `"on"`, then you need to turn them off.

To disable Auto Minify for your zone, send a `PATCH` request to the `/zones/<ZONE_ID>/settings/minify` endpoint.
## Turn off Auto Minify using the API

```sh title="cURL example"
curl -X PATCH 'https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/settings/minify' \
--header "Authorization: Bearer <CF_API_TOKEN>" \
--header "Content-Type: application/json" \
-d '{"value":{"css":"off","html":"off","js":"off"}}'
```
To turn off Auto Minify for your zone, send a `PATCH` request to the `/zones/{zone_id}/settings/minify` endpoint. The value for `success` in the response should be `true`.

If successful, you will get something similar to this response. The value for `success` should be `true`.
```bash
curl --request PATCH \
"https://api.cloudflare.com/client/v4/zones/{zone_id}/settings/minify" \
--header "Authorization: Bearer <API_TOKEN>" \
--header "Content-Type: application/json" \
--data '{ "value": { "css": "off","html": "off","js": "off" } }'
```

```json title="Example disabled response" {8}
```json output {8}
{
"result": {
"id": "minify",
"value": { "js": "off", "css": "off", "html": "off" },
"modified_on": "2024-08-15T19:32:20.882640Z",
"editable": true
},
"success": true,
"errors": [],
"messages": []
"result": {
"id": "minify",
"value": { "js": "off", "css": "off", "html": "off" },
"modified_on": "2024-11-15T19:32:20.882640Z",
"editable": true
},
"success": true,
"errors": [],
"messages": []
}
```
Loading