[Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) serves your WordPress site from Cloudflare's edge network and caches third-party fonts.
/zones/{zone_identifier}/settings/automatic_platform_optimization
patch
Zone Settings
zone-settings-change-automatic_platform_optimization-setting
{
"business": true,
"enterprise": true,
"free": true,
"pro": true
} {
"enum": [
"#zone_settings:edit"
]
} [
{
"in": "path",
"name": "zone_identifier",
"required": true,
"schema": {
"description": "Identifier",
"example": "023e105f4ecef8ad9ca31a8372d0c353",
"maxLength": 32,
"type": "string"
}
}
] {
"content": {
"application/json": {
"schema": {
"properties": {
"value": {
"properties": {
"cache_by_device_type": {
"description": "Indicates whether or not [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) is enabled.",
"example": false,
"type": "boolean"
},
"cf": {
"default": false,
"description": "Indicates whether or not Cloudflare proxy is enabled.",
"example": true,
"type": "boolean"
},
"enabled": {
"default": false,
"description": "Indicates whether or not Automatic Platform Optimization is enabled.",
"example": true,
"type": "boolean"
},
"hostnames": {
"description": "An array of hostnames where Automatic Platform Optimization for WordPress is activated.",
"example": [
"www.example.com",
"example.com",
"shop.example.com"
],
"items": {
"format": "hostname",
"type": "string"
},
"type": "array"
},
"wordpress": {
"default": false,
"description": "Indicates whether or not site is powered by WordPress.",
"example": true,
"type": "boolean"
},
"wp_plugin": {
"default": false,
"description": "Indicates whether or not [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is installed.",
"example": true,
"type": "boolean"
}
},
"required": [
"enabled",
"cf",
"wordpress",
"wp_plugin",
"hostnames",
"cache_by_device_type"
],
"type": "object"
}
},
"required": [
"value"
]
}
}
},
"required": true
} {
"200": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"allOf": [
{
"properties": {
"errors": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"messages": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"success": {
"description": "Whether the API call was successful",
"example": true,
"type": "boolean"
}
},
"required": [
"success",
"errors",
"messages"
],
"type": "object"
},
{
"properties": {
"result": {
"type": "object"
}
}
}
]
},
{
"properties": {
"result": {
"properties": {
"cache_by_device_type": {
"description": "Indicates whether or not [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) is enabled.",
"example": false,
"type": "boolean"
},
"cf": {
"default": false,
"description": "Indicates whether or not Cloudflare proxy is enabled.",
"example": true,
"type": "boolean"
},
"enabled": {
"default": false,
"description": "Indicates whether or not Automatic Platform Optimization is enabled.",
"example": true,
"type": "boolean"
},
"hostnames": {
"description": "An array of hostnames where Automatic Platform Optimization for WordPress is activated.",
"example": [
"www.example.com",
"example.com",
"shop.example.com"
],
"items": {
"format": "hostname",
"type": "string"
},
"type": "array"
},
"wordpress": {
"default": false,
"description": "Indicates whether or not site is powered by WordPress.",
"example": true,
"type": "boolean"
},
"wp_plugin": {
"default": false,
"description": "Indicates whether or not [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is installed.",
"example": true,
"type": "boolean"
}
},
"required": [
"enabled",
"cf",
"wordpress",
"wp_plugin",
"hostnames",
"cache_by_device_type"
],
"type": "object"
}
}
}
]
}
}
},
"description": "Change Automatic Platform Optimization for WordPress setting response"
},
"4XX": {
"content": {
"application/json": {
"schema": {
"properties": {
"errors": {
"allOf": [
{
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
}
],
"example": [
{
"code": 7003,
"message": "No route for the URI"
}
],
"minLength": 1
},
"messages": {
"allOf": [
{
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
}
],
"example": []
},
"result": {
"nullable": true,
"type": "object"
},
"success": {
"description": "Whether the API call was successful",
"example": false,
"type": "boolean"
}
},
"required": [
"success",
"errors",
"messages",
"result"
],
"type": "object"
}
}
},
"description": "Change Automatic Platform Optimization for WordPress setting response failure"
}
} [
{
"api_token": []
},
{
"api_email": [],
"api_key": []
}
]