Last modified: April 19th, 2018

Getting started

Cloudflare's API exposes the entire Cloudflare infrastructure via a standardized programmatic interface. Using Cloudflare's API, you can do just about anything you can do on cloudflare.com via the customer dashboard.

The Cloudflare API is a RESTful API based on HTTPS requests and JSON responses. If you are registered with Cloudflare, you can obtain your API key from the bottom of the "My Account" page, found here: Go to My account.

What is Cloudflare?

Cloudflare makes sites lightning fast, protects them from attacks, ensures they are always online, and makes it simple to add web apps with a single click. More than 5 percent of global Web requests flow through Cloudflare's network; every month more than 1.8 billion people experience a faster, safer, better Internet thanks to Cloudflare.

Audience for APIs

Cloudflare offers public APIs with three audiences in mind.

  1. Cloudflare customers
  2. Cloudflare partners
  3. Developers

Customers: Individuals and organizations all over the world choose Cloudflare to protect and accelerate their web applications. Most customers manage their settings in the web dashboard, built using these APIs. Virtually anything you can do in the customer dashboard may be done via API. Example: purging the Cloudflare edge cache for a single file when it's updated on the origin server.

Partners: Many organizations make using Cloudflare a seamless option for improving their customers' performance and security. These APIs make that easier to do at scale. Example: a Cloudflare Certified Hosting Partner may use APIs to toggle basic security mode inside a hosting control panel.

Developers: Developers all over the world create useful applications which tie into Cloudflare services. These applications may include plugins and extensions to popular content management systems, apps that are offered in the Cloudflare Apps marketplace, runbooks for specific deployment systems, and many others.

Do's and Don'ts

What can you build with Cloudflare APIs?

Anything that's useful and follows the guidelines presented here.

What should you avoid doing with Cloudflare APIs?

Do not do any of the following:

  • Abuse Cloudflare systems or customers
  • Misuse Cloudflare trademarks
  • Misrepresent Cloudflare services as your own

Abuse: Follow all guidelines, including the rate limits defined below. Your ability to use the Cloudflare APIs may be terminated, temporarily or permanently, if our systems are abused. Similarly, anything in an application which goes against the goal of making Cloudflare more useful to Cloudflare customers or attempts to mistreat customers or their data will be grounds for termination.

Trademarks: Cloudflare has several registered trademarks. Details on how and when you may use Cloudflare trademarks are found at https://www.cloudflare.com/trademark, with links to specifics on logo use and spelling. Please review carefully.

Misrepresentation: Draw a clear line between the benefits you provide in your application and those benefits of the Cloudflare service that you enable via API. The APIs are not intended for "white labeling" or reselling Cloudflare services as your own. Nothing in your service or application should create a false sense of endorsement, sponsorship, or association with Cloudflare. You may sell your own application or service which utilizes the Cloudflare APIs, but may not sell Cloudflare services to customers without a commercial agreement with Cloudflare.

The full Cloudflare Terms of Use are found at https://www.cloudflare.com/terms.

getting-started-endpoints

Endpoints

The API is accessed by making HTTPS requests to a specific version endpoint URL, in which GET, POST, PUT, PATCH, and DELETE methods dictate how your interact with the information available. Every endpoint is accessed only via the SSL-enabled HTTPS (port 443) protocol.

Everything (methods, parameters, etc.) is fixed to a version number, and every call must contain one. The latest version is Version 4.

The stable base URL for all Version 4 HTTPS endpoints is:

https://api.cloudflare.com/client/v4/

getting-started-requests

Requests

Requests must be sent over HTTPS with any payload formatted in JSON. All requests must include both X-Auth-Key and X-Auth-Email headers to authenticate. Requests that use X-Auth-User-Service-Key can use that instead of the Auth-Key and Auth-Email headers.

Required parameters

NameFormatDescription
API KeyX-Auth-KeyAPI key generated on the "My Account" page
EmailX-Auth-EmailEmail address associated with your account
User Service KeyX-Auth-User-Service-KeyA special Cloudflare API key good for a restricted set of endpoints. Always begins with "v1.0-", may vary in length.

Example request

Requests are generally formatted as follows:

GET object/:object_id
Auth-Email cURL (example)
curl -X GET "https://api.cloudflare.com/client/v4/zones/cd7d0123e3012345da9420df9514dad0" \
     -H "Content-Type:application/json" \
     -H "X-Auth-Key:1234567893feefc5f0q5000bfo0c38d90bbeb" \
     -H "X-Auth-Email:[email protected]"
User-Service cURL (example)
curl -X GET "https://api.cloudflare.com/client/v4/zones/cd7d0123e3012345da9420df9514dad0" \
     -H "Content-Type:application/json" \
     -H "X-Auth-User-Service-Key:v1.0-e24fd090c02efcfecb4de8f4ff246fd5c75b48946fdf0ce26c59f91d0d90797b-cfa33fe60e8e34073c149323454383fc9005d25c9b4c502c2f063457ef65322eade065975001a0b4b4c591c5e1bd36a6e8f7e2d4fa8a9ec01c64c041e99530c2-07b9efe0acd78c82c8d9c690aacb8656d81c369246d7f996a205fe3c18e9254a"`

Rate limiting

The Cloudflare API sets a maximum of 1,200 requests in a five minute period.

Cache-Tag purging has a lower rate limit of up to 2,000 purge API calls in every 24 hour period. You may purge up to 30 tags in one API call.

Pagination

Depending on your request, the results returned may be limited. You can page through the returned results with the following query parameters.

NameTypeDescription
pageintegerWhich page of results to return
per_pageintegerHow many results to return per page
orderstringAttribute name to order the responses by
directionstringEither asc or desc
cURL (example)
GET zones/:zone_identifier/dns_records
curl -X GET "https://api.cloudflare.com/client/v4/zones/cd7d068de3012345da9420df9514dad0/dns_records?page=3&per_page=20&order=type&direction=asc" \
     -H "Content-Type:application/json" \
     -H "X-Auth-Key:1234567893feefc5f0q5000bfo0c38d90bbeb" \
     -H "X-Auth-Email:[email protected]"
getting-started-responses

Responses

Format

Each response is a JSON object. The data requested is wrapped in the result tag. If you have a response, it will always be within the result field. We also include a success flag, an array of potential errors, and messages in the response. Some responses can have additional pagination info wrapped in the result_info

An error object will contain an integer code field and a message

Date fields will always be in UTC ISO-8601 format, including microseconds.

Success Response (example)
{
  "result": {
    "id":"2d4d028de3015345da9420df5514dad0",
    "type":"A",
    "name":"blog.example.com",
    "content":"2.6.4.5",
    "proxiable":true,
    "proxied":false,
    "ttl":1,
    "priority":0,
    "locked":false,
    "zone_id":"cd7d068de3012345da9420df9514dad0",
    "zone_name":"example.com",
    "modified_on":"2014-05-28T18:46:18.764425Z",
    "created_on":"2014-05-28T18:46:18.764425Z"
  },
  "success": true,
  "errors": [],
  "messages": [],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "count": 1,
    "total_count": 200
  }
}
Error Response (example)
{
  "result": null,
  "success": false,
  "errors": [{"code":1003,"message":"Invalid or missing zone id."}],
  "messages": []
}

HTTP Content-Type

The response format can be determined from the HTTP Content-Type header. Most API responses are JSON (Content-Type: application/json).

Content-TypeDescription
application/jsonresponse is a JSON object
text/plainresponse is a textual item
application/x-yamlresponse is a YAML object
application/octet-streamresponse is a raw data (reserved for later use)

HTTP response codes

The status of a response can be determined from the HTTP status code.

CodeStatusDescription
200OKrequest successful
304Not Modified
400Bad Requestrequest was invalid
401Unauthorizeduser does not have permission
403Forbiddenrequest not authenticated
429Too many requestsclient is rate limited
405Method Not Allowedincorrect HTTP method provided
415Unsupported Media Typeresponse is not valid JSON
getting-started-resource-ids

How to get a Zone ID, User ID, or Organization ID

Nearly every resource in the v4 API (Users, Zones, Settings, Organizations, etc.) may be uniquely identified by a 32-byte string of hex characters ([a-f0-9]). These identifiers may be referred to in the documentation as zone_identifier, user_id, or even just id. Identifier values are usually captured during resource creation (POST requests) or when fetching entire collections (GET requests) of resources. Typically they appear as an id field in the JSON resource.

{
  "result": {
    "id":"2d4d028de3015345da9420df5514dad0",
    "type":"example"
  }
}

You can always find the IDs for API resources by making a GET request to its corresponding collection endpoint. For example, to list all Zone objects, a GET request may be sent to https://api.cloudflare.com/client/v4/zones. All objects listed in the result array will contain an id field; this is also known as zone_identifier.

How to Get a Zone ID

curl -X GET "https://api.cloudflare.com/client/v4/zones" \
    -H "X-Auth-Email: [email protected]" \
    -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
    -H "Content-Type: application/json"

User

The currently logged in/authenticated User

user

Object definition

View properties and constraints defined on the object

Show definition

user-user-details

GET User details
  • free
  • pro
  • business
  • enterprise

GET user
cURL (example)
curl -X GET "https://api.cloudflare.com/client/v4/user" \
     -H "X-Auth-Email: [email protected]" \
     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
     -H "Content-Type: application/json"
Response (example)
{
  "success": true,
  "errors": [],
  "messages": [],
  "result": {
    "id": "7c5dae5552338874e5053f2534d2767a",
    "email": "[email protected]",
    "first_name": "John",
    "last_name": "Appleseed",
    "username": "cfuser12345",
    "telephone": "+1 123-123-1234",
    "country": "US",
    "zipcode": "12345",
    "created_on": "2014-01-01T05:20:00Z",
    "modified_on": "2014-01-01T05:20:00Z",
    "two_factor_authentication_enabled": false
  }
}
user-update-user

PATCH Update user
  • free
  • pro
  • business
  • enterprise

Update part of your user details

PATCH user

Optional parameters

Name /typeDescription /exampleConstraints
first_name
string

User's first name

"John"
  • max length: 60
last_name
string

User's last name

"Appleseed"
  • max length: 60
telephone
string

User's telephone number

"+1 123-123-1234"
  • max length: 20
country
string

The country in which the user lives.

"US"
  • max length: 30
zipcode
string

The zipcode or postal code where the user lives.

"12345"
  • max length: 20
cURL (example)
curl -X PATCH "https://api.cloudflare.com/client/v4/user" \
     -H "X-Auth-Email: [email protected]" \
     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
     -H "Content-Type: application/json" \
     --data '{"first_name":"John","last_name":"Appleseed","telephone":"+1 123-123-1234","country":"US","zipcode":"12345"}'
Response (example)
{
  "success": true,
  "errors": [],
  "messages": [],
  "result": {
    "id": "7c5dae5552338874e5053f2534d2767a",
    "email": "[email protected]",
    "first_name": "John",
    "last_name": "Appleseed",
    "username": "cfuser12345",
    "telephone": "+1 123-123-1234",
    "country": "US",
    "zipcode": "12345",
    "created_on": "2014-01-01T05:20:00Z",
    "modified_on": "2014-01-01T05:20:00Z",
    "two_factor_authentication_enabled": false
  }
}

User Billing Profile

A user billing profile

user-billing-profile

Object definition

View properties and constraints defined on the object

Show definition

user-billing-profile-billing-profile

GET Billing Profile permission needed: #billing:read
  • free
  • pro
  • business
  • enterprise

Access your billing profile object

GET user/billing/profile
cURL (example)
curl -X GET "https://api.cloudflare.com/client/v4/user/billing/profile" \
     -H "X-Auth-Email: [email protected]" \
     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
     -H "Content-Type: application/json"
Response (example)
{
  "success": true,
  "errors": [],
  "messages": [],
  "result": {
    "id": "0020c268dbf54e975e7fe8563df49d52",
    "first_name": "Bob",
    "last_name": "Smith",
    "address": "123 3rd St.",
    "address2": "Apt 123",
    "company": "Cloudflare",
    "city": "San Francisco",
    "state": "CA",
    "zipcode": "12345",
    "country": "US",
    "telephone": "+1 111-867-5309",
    "card_number": "xxxx-xxxx-xxxx-1234",
    "card_expiry_year": 2015,
    "card_expiry_month": 4,
    "vat": "aaa-123-987",
    "edited_on": "2014-03-01T12:21:02.0000Z",
    "created_on": "2014-03-01T12:21:02.0000Z"
  }
}

User Billing History

A user billing history

user-billing-history

Object definition

View properties and constraints defined on the object

Show definition

user-billing-history-billing-history

GET Billing history permission needed: #billing:read
  • free
  • pro
  • business
  • enterprise

Access your billing history object

GET user/billing/history

Optional parameters

Name /typeDescription /exampleConstraints
page
number

Page number of paginated results

1
  • default value: 1
  • min value:1
per_page
number

Number of items per page

20
  • default value: 20
  • min value:5
  • max value:50
order

Field to order billing history by

"occured_at"
  • valid values: type, occured_at, action
type
string

The billing item type

"charge"
  • max length: 30
  • read only
occured_at
string (date-time)

When the billing item was created

"2014-03-01T12:21:59.3456Z"
  • read only
action
string

The billing item action

"subscription"
  • max length: 30
  • read only
cURL (example)
curl -X GET "https://api.cloudflare.com/client/v4/user/billing/history?page=1&per_page=20&order=occured_at&type=charge&occured_at=2014-03-01T12:21:59.3456Z&action=subscription" \
     -H "X-Auth-Email: [email protected]" \
     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
     -H "Content-Type: application/json"
Response (example)
{
  "success": true,
  "errors": [],
  "messages": [],
  "result": [
    {
      "id": "b69a9f3492637782896352daae219e7d",
      "type": "charge",
      "action": "subscription",
      "description": "The billing item description",
      "occurred_at": "2014-03-01T12:21:59.3456Z",
      "amount": 20.99,
      "currency": "USD",
      "zone": {
        "name": "example.com"
      }
    }
  ],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "count": 1,
    "total_count": 2000
  }
}

User Subscription

Listing of a user's subscriptions

user-subscription

Object definition

View properties and constraints defined on the object

Show definition

user-subscription-get-user-subscriptions

GET Get User Subscriptions permission needed: #billing:read

Lists all a user's subscriptions

GET user/subscriptions
cURL (example)
curl -X GET "https://api.cloudflare.com/client/v4/user/subscriptions" \
     -H "X-Auth-Email: [email protected]" \
     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
     -H "Content-Type: application/json"
Response (example)
{
  "success": true,
  "errors": [],
  "messages": [],
  "result": [
    {
      "id": "506e3185e9c882d175a2d0cb0093d9f2",
      "state": "Paid",
      "price": 20,
      "currency": "USD",
      "component_values": [
        {
          "name": "page_rules",
          "value": 20,
          "default": 5,
          "price": 5
        }
      ],
      "zone": {
        "id": "023e105f4ecef8ad9ca31a8372d0c353",
        "name": "example.com"
      },
      "frequency": "monthly",
      "rate_plan": {
        "id": "free",
        "public_name": "Business Plan",
        "currency": "USD",
        "scope": "zone",
        "externally_managed": false
      },
      "current_period_end": "2014-03-31T12:20:00Z",
      "current_period_start": "2014-05-11T12:20:00Z"
    }
  ],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "count": 1,
    "total_count": 2000
  }
}
user-subscription-update-a-user-subscription

PUT Update a User Subscription permission needed: #billing:read#billing:edit
  • free
  • pro
  • business
  • enterprise

Update a user subscriptions.

PUT user/subscriptions/:identifier

Required parameters

Name /typeDescription /exampleConstraints
price
number

The price of the subscription that will be billed, in US dollars

20
  • read only
currency
string

The monetary unit in which pricing information is displayed

"USD"
  • read only
id
string

Subscription identifier tag

"506e3185e9c882d175a2d0cb0093d9f2"
  • max length: 32
  • read only
frequency

How often the subscription is renewed automatically

"monthly"
  • valid values: weekly, monthly, quarterly, yearly

Optional parameters

Name /typeDescription /exampleConstraints
current_period_end
string (date-time)

The end of the current period, and also when the next billing is due

"2014-03-31T12:20:00Z"
  • read only
component_values
array

The list of add-ons subscribed to

[ { "name": "page_rules", "value": 20, "default": 5, "price": 5 } ]
An array with items in the following form:
    rate_plan
    object

    The rate plan applied to the subscription

    { "id": "free", "public_name": "Business Plan", "currency": "USD", "scope": "zone", "externally_managed": false }
    An object with the following properties:
      current_period_start
      string (date-time)

      When the current billing period started, may be the same as InitialPeriodStart if this is the first period

      "2014-05-11T12:20:00Z"
      • read only
      zone
      object

      A simple zone object. May have null properties if not a zone subscription.

      { "id": "023e105f4ecef8ad9ca31a8372d0c353", "name": "example.com" }
      An object with the following properties:
        state

        The state that the subscription is in

        "Paid"
        • valid values: Trial, Provisioned, Paid, AwaitingPayment, Cancelled, Failed, Expired
        • read only
        cURL (example)
        curl -X PUT "https://api.cloudflare.com/client/v4/user/subscriptions/506e3185e9c882d175a2d0cb0093d9f2" \
             -H "X-Auth-Email: [email protected]" \
             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
             -H "Content-Type: application/json" \
             --data '{"id":"506e3185e9c882d175a2d0cb0093d9f2","state":"Paid","price":20,"currency":"USD","component_values":[{"name":"page_rules","value":20,"default":5,"price":5}],"zone":{"id":"023e105f4ecef8ad9ca31a8372d0c353","name":"example.com"},"frequency":"monthly","rate_plan":{"id":"free","public_name":"Business Plan","currency":"USD","scope":"zone","externally_managed":false},"current_period_end":"2014-03-31T12:20:00Z","current_period_start":"2014-05-11T12:20:00Z"}'
        Response (example)
        {
          "success": true,
          "errors": [],
          "messages": [],
          "result": {
            "id": "506e3185e9c882d175a2d0cb0093d9f2",
            "state": "Paid",
            "price": 20,
            "currency": "USD",
            "component_values": [
              {
                "name": "page_rules",
                "value": 20,
                "default": 5,
                "price": 5
              }
            ],
            "zone": {
              "id": "023e105f4ecef8ad9ca31a8372d0c353",
              "name": "example.com"
            },
            "frequency": "monthly",
            "rate_plan": {
              "id": "free",
              "public_name": "Business Plan",
              "currency": "USD",
              "scope": "zone",
              "externally_managed": false
            },
            "current_period_end": "2014-03-31T12:20:00Z",
            "current_period_start": "2014-05-11T12:20:00Z"
          }
        }
        user-subscription-delete-user-subscriptions

        DELETE Delete User Subscriptions permission needed: #billing:edit

        Deletes a user's subscriptions

        DELETE user/subscriptions/:identifier
        cURL (example)
        curl -X DELETE "https://api.cloudflare.com/client/v4/user/subscriptions/506e3185e9c882d175a2d0cb0093d9f2" \
             -H "X-Auth-Email: [email protected]" \
             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
             -H "Content-Type: application/json"
        Response (example)
        {
          "subscription_id": "506e3185e9c882d175a2d0cb0093d9f2"
        }

        User-level Firewall access rule

        A firewall access rule applied to all zones owned by the user

        user-level-firewall-access-rule

        Object definition

        View properties and constraints defined on the object

        Show definition

        user-level-firewall-access-rule-list-access-rules

        GET List access rules
        • free
        • pro
        • business
        • enterprise

        Search, sort, and filter IP/country access rules

        GET user/firewall/access_rules/rules

        Optional parameters

        Name /typeDescription /exampleConstraints
        notes
        string

        Search in the access rules by notes.

        "my note"
        • notes: Matching any string within previously created access rules with the notes. For example, access rules with notes 'Attack 26/02' & 'Attack 27/02' would both match string 'attack'. Search is not case sensitive.
        mode

        The action to apply to a matched request

        "challenge"
        • valid values: block, challenge, whitelist, js_challenge
        match

        Whether to match all search requirements or at least one (any)

        "all"
        • default value: all
        • valid values: any, all
        configuration.target
        string

        Search rules by target

        "ip"
        • valid values: ip, ip_range, asn, country
        order

        Field to order rules by

        "mode"
        • valid values: configuration.target, configuration.value, mode
        page
        number

        Requested page within paginated list of results

        1
          per_page
          number

          Maximum number of results requested

          20
            configuration.value
            string

            Search by IP, range, or country code

            "1.2.3.4"
            • notes: IP is a single IPv4 address. IP range has a subnet of /16 or /24. Country code is an ISO 2-letter country code.
            direction

            Direction to order rules

            "desc"
            • valid values: asc, desc
            cURL (example)
            curl -X GET "https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules?page=1&per_page=20&mode=challenge&configuration.target=ip&configuration.value=1.2.3.4&notes=my note&match=all&order=mode&direction=desc" \
                 -H "X-Auth-Email: [email protected]" \
                 -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                 -H "Content-Type: application/json"
            Response (example)
            {
              "success": true,
              "errors": [],
              "messages": [],
              "result": [
                {
                  "id": "92f17202ed8bd63d69a66b86a49a8f6b",
                  "notes": "This rule is on because of an event that occured on date X",
                  "allowed_modes": [
                    "whitelist",
                    "block",
                    "challenge",
                    "js_challenge"
                  ],
                  "mode": "challenge",
                  "configuration": {
                    "target": "ip",
                    "value": "1.2.3.4"
                  },
                  "created_on": "2014-01-01T05:20:00.12345Z",
                  "modified_on": "2014-01-01T05:20:00.12345Z",
                  "scope": {
                    "id": "7c5dae5552338874e5053f2534d2767a",
                    "email": "[email protected]",
                    "type": "user"
                  }
                }
              ],
              "result_info": {
                "page": 1,
                "per_page": 20,
                "count": 1,
                "total_count": 2000
              }
            }
            user-level-firewall-access-rule-create-access-rule

            POST Create access rule
            • free
            • pro
            • business
            • enterprise

            Make a new IP, IP range, or country access rule for all zones owned by the user. Note: If you would like to create an access rule that applies to a specific zone only, use the zone firewall endpoints.

            POST user/firewall/access_rules/rules

            Required parameters

            Name /typeDescription /exampleConstraints
            mode

            The action to apply to a matched request

            "challenge"
            • valid values: block, challenge, whitelist, js_challenge
            configuration
            object

            Rule configuration

            { "target": "ip", "value": "1.2.3.4" }
            One of the following:

              Optional parameters

              Name /typeDescription /exampleConstraints
              notes
              string

              A personal note about the rule. Typically used as a reminder or explanation for the rule.

              "This rule is on because of an event that occured on date X"
                cURL (example)
                curl -X POST "https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules" \
                     -H "X-Auth-Email: [email protected]" \
                     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                     -H "Content-Type: application/json" \
                     --data '{"mode":"challenge","configuration":{"target":"ip","value":"1.2.3.4"},"notes":"This rule is on because of an event that occured on date X"}'
                Response (example)
                {
                  "success": true,
                  "errors": [],
                  "messages": [],
                  "result": {
                    "id": "92f17202ed8bd63d69a66b86a49a8f6b",
                    "notes": "This rule is on because of an event that occured on date X",
                    "allowed_modes": [
                      "whitelist",
                      "block",
                      "challenge",
                      "js_challenge"
                    ],
                    "mode": "challenge",
                    "configuration": {
                      "target": "ip",
                      "value": "1.2.3.4"
                    },
                    "created_on": "2014-01-01T05:20:00.12345Z",
                    "modified_on": "2014-01-01T05:20:00.12345Z",
                    "scope": {
                      "id": "7c5dae5552338874e5053f2534d2767a",
                      "email": "[email protected]",
                      "type": "user"
                    }
                  }
                }
                user-level-firewall-access-rule-update-access-rule

                PATCH Update access rule
                • free
                • pro
                • business
                • enterprise

                Update rule state and/or note. This will be applied across all zones owned by the user.

                PATCH user/firewall/access_rules/rules/:identifier

                Optional parameters

                Name /typeDescription /exampleConstraints
                mode

                The action to apply to a matched request

                "challenge"
                • valid values: block, challenge, whitelist, js_challenge
                notes
                string

                A personal note about the rule. Typically used as a reminder or explanation for the rule.

                "This rule is on because of an event that occured on date X"
                  cURL (example)
                  curl -X PATCH "https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules/92f17202ed8bd63d69a66b86a49a8f6b" \
                       -H "X-Auth-Email: [email protected]" \
                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                       -H "Content-Type: application/json" \
                       --data '{"mode":"challenge","notes":"This rule is on because of an event that occured on date X"}'
                  Response (example)
                  {
                    "success": true,
                    "errors": [],
                    "messages": [],
                    "result": {
                      "id": "92f17202ed8bd63d69a66b86a49a8f6b",
                      "notes": "This rule is on because of an event that occured on date X",
                      "allowed_modes": [
                        "whitelist",
                        "block",
                        "challenge",
                        "js_challenge"
                      ],
                      "mode": "challenge",
                      "configuration": {
                        "target": "ip",
                        "value": "1.2.3.4"
                      },
                      "created_on": "2014-01-01T05:20:00.12345Z",
                      "modified_on": "2014-01-01T05:20:00.12345Z",
                      "scope": {
                        "id": "7c5dae5552338874e5053f2534d2767a",
                        "email": "[email protected]",
                        "type": "user"
                      }
                    }
                  }
                  user-level-firewall-access-rule-delete-access-rule

                  DELETE Delete access rule
                  • free
                  • pro
                  • business
                  • enterprise

                  Remove an access rule so it is no longer evaluated during requests. This will apply to all zones owned by the user

                  DELETE user/firewall/access_rules/rules/:identifier
                  cURL (example)
                  curl -X DELETE "https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules/92f17202ed8bd63d69a66b86a49a8f6b" \
                       -H "X-Auth-Email: [email protected]" \
                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                       -H "Content-Type: application/json"
                  Response (example)
                  {
                    "success": true,
                    "errors": [],
                    "messages": [],
                    "result": {
                      "id": "92f17202ed8bd63d69a66b86a49a8f6b"
                    }
                  }

                  User's Organizations

                  A list of organizations this user is a member of

                  user-s-organizations

                  Object definition

                  View properties and constraints defined on the object

                  Show definition

                  user-s-organizations-list-organizations

                  GET List organizations
                  • free
                  • pro
                  • business
                  • enterprise

                  List organizations the user is associated with

                  GET user/organizations

                  Optional parameters

                  Name /typeDescription /exampleConstraints
                  status

                  Whether or not the user is a member of the organization or has an inivitation pending

                  "member"
                  • valid values: member, invited
                  name
                  string

                  Organization Name

                  "Cloudflare, Inc."
                  • max length: 100
                  page
                  number

                  Page number of paginated results

                  1
                  • default value: 1
                  • min value:1
                  per_page
                  number

                  Number of organizations per page

                  20
                  • default value: 20
                  • min value:5
                  • max value:50
                  order

                  Field to order organizations by

                  "status"
                  • valid values: id, name, status
                  direction

                  Direction to order organizations

                  "desc"
                  • valid values: asc, desc
                  match

                  Whether to match all search requirements or at least one (any)

                  "all"
                  • default value: all
                  • valid values: any, all
                  cURL (example)
                  curl -X GET "https://api.cloudflare.com/client/v4/user/organizations?status=member&name=Cloudflare, Inc.&page=1&per_page=20&order=status&direction=desc&match=all" \
                       -H "X-Auth-Email: [email protected]" \
                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                       -H "Content-Type: application/json"
                  Response (example)
                  {
                    "success": true,
                    "errors": [],
                    "messages": [],
                    "result": [
                      {
                        "id": "01a7362d577a6c3019a474fd6f485823",
                        "name": "Cloudflare, Inc.",
                        "status": "member",
                        "permissions": [
                          "#zones:read"
                        ],
                        "roles": [
                          "All Privileges - Super Administrator"
                        ]
                      }
                    ],
                    "result_info": {
                      "page": 1,
                      "per_page": 20,
                      "count": 1,
                      "total_count": 2000
                    }
                  }
                  user-s-organizations-organization-details

                  GET Organization details
                  • free
                  • pro
                  • business
                  • enterprise

                  Get a specific organization the user is associated with

                  GET user/organizations/:identifier
                  cURL (example)
                  curl -X GET "https://api.cloudflare.com/client/v4/user/organizations/01a7362d577a6c3019a474fd6f485823" \
                       -H "X-Auth-Email: [email protected]" \
                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                       -H "Content-Type: application/json"
                  Response (example)
                  {
                    "success": true,
                    "errors": [],
                    "messages": [],
                    "result": {
                      "id": "01a7362d577a6c3019a474fd6f485823",
                      "name": "Cloudflare, Inc.",
                      "status": "member",
                      "permissions": [
                        "#zones:read"
                      ],
                      "roles": [
                        "All Privileges - Super Administrator"
                      ]
                    }
                  }
                  user-s-organizations-leave-organization

                  DELETE Leave organization
                  • free
                  • pro
                  • business
                  • enterprise

                  Remove association to an organization

                  DELETE user/organizations/:identifier
                  cURL (example)
                  curl -X DELETE "https://api.cloudflare.com/client/v4/user/organizations/01a7362d577a6c3019a474fd6f485823" \
                       -H "X-Auth-Email: [email protected]" \
                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                       -H "Content-Type: application/json"
                  Response (example)
                  {
                    "id": "01a7362d577a6c3019a474fd6f485823"
                  }

                  User's Invites

                  Your pending invitations to organizations

                  user-s-invites

                  Object definition

                  View properties and constraints defined on the object

                  Show definition

                  user-s-invites-list-invitations

                  GET List invitations
                  • free
                  • pro
                  • business
                  • enterprise

                  List all invitations associated with my user

                  GET user/invites
                  cURL (example)
                  curl -X GET "https://api.cloudflare.com/client/v4/user/invites" \
                       -H "X-Auth-Email: [email protected]" \
                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                       -H "Content-Type: application/json"
                  Response (example)
                  {
                    "success": true,
                    "errors": [],
                    "messages": [],
                    "result": [
                      {
                        "id": "4f5f0c14a2a41d5063dd301b2f829f04",
                        "invited_member_id": "5a7805061c76ada191ed06f989cc3dac",
                        "invited_member_email": "[email protected]",
                        "organization_id": "5a7805061c76ada191ed06f989cc3dac",
                        "organization_name": "Cloudflare, Inc.",
                        "roles": [
                          {
                            "id": "3536bcfad5faccb999b47003c79917fb",
                            "name": "Organization Admin",
                            "description": "Administrative access to the entire Organization",
                            "permissions": [
                              "#zones:read"
                            ]
                          }
                        ],
                        "invited_by": "[email protected]",
                        "invited_on": "2014-01-01T05:20:00Z",
                        "expires_on": "2014-01-01T05:20:00Z",
                        "status": "accepted"
                      }
                    ],
                    "result_info": {
                      "page": 1,
                      "per_page": 20,
                      "count": 1,
                      "total_count": 2000
                    }
                  }
                  user-s-invites-invitation-details

                  GET Invitation details
                  • free
                  • pro
                  • business
                  • enterprise

                  Get the details of an invitation

                  GET user/invites/:identifier
                  cURL (example)
                  curl -X GET "https://api.cloudflare.com/client/v4/user/invites/4f5f0c14a2a41d5063dd301b2f829f04" \
                       -H "X-Auth-Email: [email protected]" \
                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                       -H "Content-Type: application/json"
                  Response (example)
                  {
                    "success": true,
                    "errors": [],
                    "messages": [],
                    "result": {
                      "id": "4f5f0c14a2a41d5063dd301b2f829f04",
                      "invited_member_id": "5a7805061c76ada191ed06f989cc3dac",
                      "invited_member_email": "[email protected]",
                      "organization_id": "5a7805061c76ada191ed06f989cc3dac",
                      "organization_name": "Cloudflare, Inc.",
                      "roles": [
                        {
                          "id": "3536bcfad5faccb999b47003c79917fb",
                          "name": "Organization Admin",
                          "description": "Administrative access to the entire Organization",
                          "permissions": [
                            "#zones:read"
                          ]
                        }
                      ],
                      "invited_by": "[email protected]",
                      "invited_on": "2014-01-01T05:20:00Z",
                      "expires_on": "2014-01-01T05:20:00Z",
                      "status": "accepted"
                    }
                  }
                  user-s-invites-respond-to-invitation

                  PATCH Respond to Invitation
                  • free
                  • pro
                  • business
                  • enterprise

                  Respond to an invitation

                  PATCH user/invites/:identifier

                  Required parameters

                  Name /typeDescription /exampleConstraints
                  status

                  Status of your response to the invitation (rejected or accepted)

                  "accepted"
                  • valid values: accepted, rejected
                  cURL (example)
                  curl -X PATCH "https://api.cloudflare.com/client/v4/user/invites/4f5f0c14a2a41d5063dd301b2f829f04" \
                       -H "X-Auth-Email: [email protected]" \
                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                       -H "Content-Type: application/json" \
                       --data '{"status":"accepted"}'
                  Response (example)
                  {
                    "success": true,
                    "errors": [],
                    "messages": [],
                    "result": {
                      "id": "4f5f0c14a2a41d5063dd301b2f829f04",
                      "invited_member_id": "5a7805061c76ada191ed06f989cc3dac",
                      "invited_member_email": "[email protected]",
                      "organization_id": "5a7805061c76ada191ed06f989cc3dac",
                      "organization_name": "Cloudflare, Inc.",
                      "roles": [
                        {
                          "id": "3536bcfad5faccb999b47003c79917fb",
                          "name": "Organization Admin",
                          "description": "Administrative access to the entire Organization",
                          "permissions": [
                            "#zones:read"
                          ]
                        }
                      ],
                      "invited_by": "[email protected]",
                      "invited_on": "2014-01-01T05:20:00Z",
                      "expires_on": "2014-01-01T05:20:00Z",
                      "status": "accepted"
                    }
                  }

                  Zone

                  A Zone is a domain name along with its subdomains and other identities

                  zone

                  Object definitions

                  View properties and constraints defined on the object

                  Show definitions

                  zone-create-a-zone

                  POST Create a zone permission needed: #zone:edit
                  • free
                  • pro
                  • business
                  • enterprise

                  POST zones

                  Required parameters

                  Name /typeDescription /exampleConstraints
                  name
                  string

                  The domain name

                  "example.com"
                  • max length: 253
                  • read only
                  • pattern: ^([a-zA-Z0-9][\-a-zA-Z0-9]*\.)+[\-a-zA-Z0-9]{2,20}$

                  Optional parameters

                  Name /typeDescription /exampleConstraints
                  jump_start
                  boolean

                  Automatically attempt to fetch existing DNS records

                  true
                  • default value: false
                  • valid values: (true,false)
                  organization
                  object

                  To create a zone owned by an organization, specify the organization parameter. Organization objects can be found in the User or User's Organizations endpoints. You must pass at least the ID of the organization.

                  { "id": "01a7362d577a6c3019a474fd6f485823", "name": "Cloudflare, Inc.", "status": "active", "permissions": [ "#zones:read" ] }
                  An object with the following properties:
                    cURL (example)
                    curl -X POST "https://api.cloudflare.com/client/v4/zones" \
                         -H "X-Auth-Email: [email protected]" \
                         -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                         -H "Content-Type: application/json" \
                         --data '{"name":"example.com","jump_start":true,"organization":{"id":"01a7362d577a6c3019a474fd6f485823","name":"Cloudflare, Inc.","status":"active","permissions":["#zones:read"]}}'
                    Response (example)
                    {
                      "success": true,
                      "errors": [],
                      "messages": [],
                      "result": {
                        "id": "023e105f4ecef8ad9ca31a8372d0c353",
                        "name": "example.com",
                        "development_mode": 7200,
                        "original_name_servers": [
                          "ns1.originaldnshost.com",
                          "ns2.originaldnshost.com"
                        ],
                        "original_registrar": "GoDaddy",
                        "original_dnshost": "NameCheap",
                        "created_on": "2014-01-01T05:20:00.12345Z",
                        "modified_on": "2014-01-01T05:20:00.12345Z",
                        "owner": {
                          "id": "7c5dae5552338874e5053f2534d2767a",
                          "email": "[email protected]",
                          "owner_type": "user"
                        },
                        "permissions": [
                          "#zone:read",
                          "#zone:edit"
                        ],
                        "plan": {
                          "id": "e592fd9519420ba7405e1307bff33214",
                          "name": "Pro Plan",
                          "price": 20,
                          "currency": "USD",
                          "frequency": "monthly",
                          "legacy_id": "pro",
                          "is_subscribed": true,
                          "can_subscribe": true
                        },
                        "plan_pending": {
                          "id": "e592fd9519420ba7405e1307bff33214",
                          "name": "Pro Plan",
                          "price": 20,
                          "currency": "USD",
                          "frequency": "monthly",
                          "legacy_id": "pro",
                          "is_subscribed": true,
                          "can_subscribe": true
                        },
                        "status": "active",
                        "paused": false,
                        "type": "full",
                        "name_servers": [
                          "tony.ns.cloudflare.com",
                          "woz.ns.cloudflare.com"
                        ]
                      }
                    }
                    zone-initiate-another-zone-activation-check

                    PUT Initiate another zone activation check permission needed: #zone:edit
                    • free
                    • pro
                    • business
                    • enterprise

                    PUT zones/:identifier/activation_check
                    cURL (example)
                    curl -X PUT "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/activation_check" \
                         -H "X-Auth-Email: [email protected]" \
                         -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                         -H "Content-Type: application/json"
                    Response (example)
                    {
                      "success": true,
                      "errors": [],
                      "messages": [],
                      "result": {
                        "id": "9a7806061c88ada191ed06f989cc3dac"
                      }
                    }
                    zone-list-zones

                    GET List zones permission needed: #zone:read
                    • free
                    • pro
                    • business
                    • enterprise

                    List, search, sort, and filter your zones

                    GET zones

                    Optional parameters

                    Name /typeDescription /exampleConstraints
                    name
                    string (hostname)

                    A domain name

                    "example.com"
                    • max length: 253
                    status

                    Status of the zone

                    "active"
                    • valid values: active, pending, initializing, moved, deleted, deactivated
                    • read only
                    page
                    number

                    Page number of paginated results

                    1
                    • default value: 1
                    • min value:1
                    per_page
                    number

                    Number of zones per page

                    20
                    • default value: 20
                    • min value:5
                    • max value:50
                    order

                    Field to order zones by

                    "status"
                    • valid values: name, status, email
                    direction

                    Direction to order zones

                    "desc"
                    • valid values: asc, desc
                    match

                    Whether to match all search requirements or at least one (any)

                    "all"
                    • default value: all
                    • valid values: any, all
                    cURL (example)
                    curl -X GET "https://api.cloudflare.com/client/v4/zones?name=example.com&status=active&page=1&per_page=20&order=status&direction=desc&match=all" \
                         -H "X-Auth-Email: [email protected]" \
                         -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                         -H "Content-Type: application/json"
                    Response (example)
                    {
                      "success": true,
                      "errors": [],
                      "messages": [],
                      "result": [
                        {
                          "id": "023e105f4ecef8ad9ca31a8372d0c353",
                          "name": "example.com",
                          "development_mode": 7200,
                          "original_name_servers": [
                            "ns1.originaldnshost.com",
                            "ns2.originaldnshost.com"
                          ],
                          "original_registrar": "GoDaddy",
                          "original_dnshost": "NameCheap",
                          "created_on": "2014-01-01T05:20:00.12345Z",
                          "modified_on": "2014-01-01T05:20:00.12345Z",
                          "owner": {
                            "id": "7c5dae5552338874e5053f2534d2767a",
                            "email": "[email protected]",
                            "owner_type": "user"
                          },
                          "permissions": [
                            "#zone:read",
                            "#zone:edit"
                          ],
                          "plan": {
                            "id": "e592fd9519420ba7405e1307bff33214",
                            "name": "Pro Plan",
                            "price": 20,
                            "currency": "USD",
                            "frequency": "monthly",
                            "legacy_id": "pro",
                            "is_subscribed": true,
                            "can_subscribe": true
                          },
                          "plan_pending": {
                            "id": "e592fd9519420ba7405e1307bff33214",
                            "name": "Pro Plan",
                            "price": 20,
                            "currency": "USD",
                            "frequency": "monthly",
                            "legacy_id": "pro",
                            "is_subscribed": true,
                            "can_subscribe": true
                          },
                          "status": "active",
                          "paused": false,
                          "type": "full",
                          "name_servers": [
                            "tony.ns.cloudflare.com",
                            "woz.ns.cloudflare.com"
                          ]
                        }
                      ],
                      "result_info": {
                        "page": 1,
                        "per_page": 20,
                        "count": 1,
                        "total_count": 2000
                      }
                    }
                    zone-zone-details

                    GET Zone details permission needed: #zone:read
                    • free
                    • pro
                    • business
                    • enterprise

                    GET zones/:identifier
                    cURL (example)
                    curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353" \
                         -H "X-Auth-Email: [email protected]" \
                         -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                         -H "Content-Type: application/json"
                    Response (example)
                    {
                      "success": true,
                      "errors": [],
                      "messages": [],
                      "result": {
                        "id": "023e105f4ecef8ad9ca31a8372d0c353",
                        "name": "example.com",
                        "development_mode": 7200,
                        "original_name_servers": [
                          "ns1.originaldnshost.com",
                          "ns2.originaldnshost.com"
                        ],
                        "original_registrar": "GoDaddy",
                        "original_dnshost": "NameCheap",
                        "created_on": "2014-01-01T05:20:00.12345Z",
                        "modified_on": "2014-01-01T05:20:00.12345Z",
                        "owner": {
                          "id": "7c5dae5552338874e5053f2534d2767a",
                          "email": "[email protected]",
                          "owner_type": "user"
                        },
                        "permissions": [
                          "#zone:read",
                          "#zone:edit"
                        ],
                        "plan": {
                          "id": "e592fd9519420ba7405e1307bff33214",
                          "name": "Pro Plan",
                          "price": 20,
                          "currency": "USD",
                          "frequency": "monthly",
                          "legacy_id": "pro",
                          "is_subscribed": true,
                          "can_subscribe": true
                        },
                        "plan_pending": {
                          "id": "e592fd9519420ba7405e1307bff33214",
                          "name": "Pro Plan",
                          "price": 20,
                          "currency": "USD",
                          "frequency": "monthly",
                          "legacy_id": "pro",
                          "is_subscribed": true,
                          "can_subscribe": true
                        },
                        "status": "active",
                        "paused": false,
                        "type": "full",
                        "name_servers": [
                          "tony.ns.cloudflare.com",
                          "woz.ns.cloudflare.com"
                        ]
                      }
                    }
                    zone-edit-zone-properties

                    PATCH Edit Zone Properties
                    • free
                    • pro
                    • business
                    • enterprise

                    Only one zone property can be changed at a time

                    PATCH zones/:identifier

                    Optional parameters

                    Name /typeDescription /exampleConstraints
                    paused
                    boolean

                    Indicates if the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.

                    false
                    • default value: false
                    • valid values: (true,false)
                    • read only
                    vanity_name_servers
                    array

                    An array of domains used for custom name servers. This is only available for Business and Enterprise plans.

                    [ "ns1.example.com", "ns2.example.com" ]
                    An array with items in the following form:
                      plan
                      object

                      The desired plan for the zone. Changing this value will create/cancel associated subscriptions. To view available plans for this zone, see Zone Plans

                      { "id": "e592fd9519420ba7405e1307bff33214" }
                      An object with the following properties:
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"paused":false,"vanity_name_servers":["ns1.example.com","ns2.example.com"],"plan":{"id":"e592fd9519420ba7405e1307bff33214"}}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "023e105f4ecef8ad9ca31a8372d0c353",
                            "name": "example.com",
                            "development_mode": 7200,
                            "original_name_servers": [
                              "ns1.originaldnshost.com",
                              "ns2.originaldnshost.com"
                            ],
                            "original_registrar": "GoDaddy",
                            "original_dnshost": "NameCheap",
                            "created_on": "2014-01-01T05:20:00.12345Z",
                            "modified_on": "2014-01-01T05:20:00.12345Z",
                            "owner": {
                              "id": "7c5dae5552338874e5053f2534d2767a",
                              "email": "[email protected]",
                              "owner_type": "user"
                            },
                            "permissions": [
                              "#zone:read",
                              "#zone:edit"
                            ],
                            "plan": {
                              "id": "e592fd9519420ba7405e1307bff33214",
                              "name": "Pro Plan",
                              "price": 20,
                              "currency": "USD",
                              "frequency": "monthly",
                              "legacy_id": "pro",
                              "is_subscribed": true,
                              "can_subscribe": true
                            },
                            "plan_pending": {
                              "id": "e592fd9519420ba7405e1307bff33214",
                              "name": "Pro Plan",
                              "price": 20,
                              "currency": "USD",
                              "frequency": "monthly",
                              "legacy_id": "pro",
                              "is_subscribed": true,
                              "can_subscribe": true
                            },
                            "status": "active",
                            "paused": false,
                            "type": "full",
                            "name_servers": [
                              "tony.ns.cloudflare.com",
                              "woz.ns.cloudflare.com"
                            ]
                          }
                        }
                        zone-purge-all-files

                        DELETE Purge all files permission needed: #zone:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Remove ALL files from Cloudflare's cache

                        DELETE zones/:identifier/purge_cache

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        purge_everything

                        A flag that indicates all resources in Cloudflare's cache should be removed. Note: This may have dramatic affects on your origin server load after performing this action.

                        true
                        • valid values: true
                        cURL (example)
                        curl -X DELETE "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/purge_cache" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"purge_everything":true}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "9a7806061c88ada191ed06f989cc3dac"
                          }
                        }
                        zone-purge-individual-files-by-url

                        DELETE Purge individual files by URL permission needed: #zone:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Granularly remove one or more files from Cloudflare's cache either by specifying URLs. All tiers can purge by URL.

                        To purge files with custom cache keys, include the headers used to compute the cache key as in the example. To purge files with ${geo} or ${devicetype} in their cache keys, include the CF-Device-Type or CF-IPCountry headers.

                        DELETE zones/:identifier/purge_cache

                        Optional parameters

                        Name /typeDescription /exampleConstraints
                        files
                        array

                        An array of URLs that should be removed from cache

                        [ "http://www.example.com/css/styles.css", { "url": "http://www.example.com/cat_picture.jpg", "headers": { "Origin": "cloudflare.com", "CF-IPCountry": "US", "CF-Device-Type": "desktop" } } ]
                        An array with items in the following form:
                        • max length: 30
                        cURL (example)
                        curl -X DELETE "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/purge_cache" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"files":["http://www.example.com/css/styles.css",{"url":"http://www.example.com/cat_picture.jpg","headers":{"Origin":"cloudflare.com","CF-IPCountry":"US","CF-Device-Type":"desktop"}}]}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "9a7806061c88ada191ed06f989cc3dac"
                          }
                        }
                        zone-purge-files-by-cache-tags-or-host

                        DELETE Purge files by Cache-Tags or host permission needed: #zone:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Granularly remove one or more files from Cloudflare's cache either by specifying the host or the associated Cache-Tag.

                        NB: Cache-Tag and host purging each have a rate limit of 2,000 purge API calls in every 24 hour period. You may purge up to 30 tags or hosts in one API call.

                        DELETE zones/:identifier/purge_cache

                        Optional parameters

                        Name /typeDescription /exampleConstraints
                        tags
                        array

                        Any assets served with a Cache-Tag header that matches one of the provided values will be purged from the Cloudflare cache

                        [ "some-tag", "another-tag" ]
                        An array with items in the following form:
                        • max length: 30
                        hosts
                        array

                        Any assets at URLs with a host that matches one of the provided values will be purged from the Cloudflare cache

                        [ "www.example.com", "images.example.com" ]
                        An array with items in the following form:
                        • max length: 30
                        cURL (example)
                        curl -X DELETE "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/purge_cache" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"tags":["some-tag","another-tag"],"hosts":["www.example.com","images.example.com"]}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "9a7806061c88ada191ed06f989cc3dac"
                          }
                        }
                        zone-delete-a-zone

                        DELETE Delete a zone permission needed: #zone:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Delete an existing zone.

                        DELETE zones/:identifier
                        cURL (example)
                        curl -X DELETE "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "9a7806061c88ada191ed06f989cc3dac"
                          }
                        }

                        Zone error codes

                        CodeDescription
                        1100Tag exceeds maximum length of 1024 characters
                        1111Exceeded maximum amount of 30 hosts that can be purged on a single request
                        1001Invalid zone identifier
                        1012Request must contain one of 'purge_everything', 'files', 'tags', or 'hosts'
                        1023Invalid or missing zone
                        1056preserve_ini must be a boolean
                        1067Invalid organization identifier passed in your organization variable
                        1078This zone has no valid vanity IPs.
                        1089Invalid/Missing Zone plan ID
                        1101Exceeded maximum amount of 30 tags that can be purged on a single request
                        1112Only enterprise zones can purge by host
                        1002Invalid domain
                        1013'purge_everything' must be true
                        1057Zone must be in 'initializing' status
                        1068Permission denied
                        1079This zone has no valid vanity name servers.
                        1102Unable to purge by tag, rate limit reached. Please wait if you need to perform more
                        1113Unable to purge by host, rate limit reached. Please wait if you need to perform more operations.
                        1003'jump_start' must be boolean
                        1014'files', 'tags', or 'hosts' must be an array
                        1069organization variable should be an organization object
                        1114Host exceeds maximum length of 200 characters
                        1015Unable to purge <url>
                        1059Unable to delete zone
                        1104Partial zone signup not allowed
                        1115Invalid host
                        1016Unable to purge any urls
                        1049<domain> is not a registered domain
                        1105This zone is temporarily banned and cannot be added to Cloudflare at this time, please contact Cloudflare Support
                        1006Invalid or missing zone
                        1017Unable to purge all
                        1106Sorry, you are not allowed to create new zones. Please contact support.
                        1018Invalid zone status
                        1107Only enterprise zones can purge by tag.
                        1008Invalid or missing Zone id
                        1019Zone is already paused
                        1108Unable to update domain subscription. Please contact support for assistance.
                        1109Unable to update domain subscription. Please contact support for assistance.
                        1080There is a conflict with one of the name servers.
                        1070This operation requires a Business or Enterprise account.
                        1081There are no valid vanity name servers to disable.
                        1092Request cannot contain 'purge_everything' and any of 'files', 'tags', or 'hosts'
                        1071Vanity name server array expected.
                        1082Unable to purge '<url>'. You can only purge files for this zone
                        1050<domain> is currently being tasted. It is not currently a registered domain
                        1061<domain> already exists
                        1083Unable to purge '<url>'. Rate limit reached. Please wait if you need to perform more operations
                        1094Exceeded maximum amount of 500 files that can be purged on a single request
                        1051Cloudflare is already hosting <domain>
                        1073A name server provided is in the wrong format.
                        1084Unable to purge '<url>'.
                        1095Sorry, you do not have access to purge cache for that zone id or that zone id is invalid
                        1052An error has occurred and it has been logged. We will fix this problem promptly. We apologize for the inconvenience
                        1074Could not find a valid zone.
                        1085Only one property can be updated at a time
                        1096This action is not available as your zone has been deactivated for a possible Terms of Service violation
                        1020Invalid or missing zone
                        1064Not allowed to update zone step. Bad zone status
                        1075Vanity name server array count is invalid
                        1086Invalid property
                        1097This zone is banned and cannot be added to Cloudflare at this time, please contact Cloudflare Support
                        1010Bulk deal limit reached
                        1021Invalid zone status
                        1065Not allowed to update zone step. Zone has already been set up
                        1076Name servers have invalid IP addresses
                        1098This zone is temporarily banned and cannot be added to Cloudflare at this time, please contact Cloudflare Support
                        1110Failed to lookup registrar and hosting information of <domain> at this time. Please contact Cloudflare Support or try again later.
                        1000Invalid or missing user
                        1022Zone is already unpaused
                        1055Failed to disable <domain>
                        1066Could not promote zone to step 3
                        1077Could not find a valid zone.
                        1088Invalid/Missing Zone plan ID
                        1099We were unable to identify <domain> as a registered domain. Please ensure you are providing the root domain and not any subdomains (e.g., example.com, not subdomain.example.com)

                        Zone Rate Plan

                        A zone rate plan from the billing service

                        zone-rate-plan

                        Object definition

                        View properties and constraints defined on the object

                        Show definition

                        zone-rate-plan-available-rate-plans

                        GET Available Rate Plans permission needed: #billing:read
                        • free
                        • pro
                        • business
                        • enterprise

                        List all rate plans the zone can subscribe to.

                        GET zones/:zone_identifier/available_rate_plans
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/available_rate_plans" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "free",
                            "name": "Free Plan",
                            "currency": "USD",
                            "duration": 1,
                            "frequency": "monthly",
                            "components": [
                              {
                                "name": "page_rules",
                                "default": 5,
                                "unit_price": 1
                              }
                            ]
                          }
                        }

                        Zone Settings

                        A Zone setting changes how the Zone works in relation to caching, security, or other features of Cloudflare

                        zone-settings

                        Object definitions

                        View properties and constraints defined on the object

                        Show definitions

                        zone-settings-get-all-zone-settings

                        GET Get all Zone settings permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Available settings for your user in relation to a zone

                        GET zones/:zone_identifier/settings
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": [
                            {
                              "id": "always_online",
                              "value": "on",
                              "editable": true,
                              "modified_on": "2014-01-01T05:20:00.12345Z"
                            }
                          ],
                          "result_info": {
                            "page": 1,
                            "per_page": 20,
                            "count": 1,
                            "total_count": 2000
                          }
                        }
                        zone-settings-get-advanced-ddos-setting

                        GET Get Advanced DDOS setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Advanced protection from Distributed Denial of Service (DDoS) attacks on your website. This is an uneditable value that is 'on' in the case of Business and Enterprise zones

                        GET zones/:zone_identifier/settings/advanced_ddos
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/advanced_ddos" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "advanced_ddos",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-always-online-setting

                        GET Get Always Online setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        When enabled, Always Online will serve pages from our cache if your server is offline (https://support.cloudflare.com/hc/en-us/articles/200168006)

                        GET zones/:zone_identifier/settings/always_online
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/always_online" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "always_online",
                            "value": "on",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-always-use-https-setting

                        GET Get Always Use HTTPS setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Reply to all requests for URLs that use "http" with a 301 redirect to the equivalent "https" URL. If you only want to redirect for a subset of requests, consider creating an "Always use HTTPS" page rule.

                        GET zones/:zone_identifier/settings/always_use_https
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/always_use_https" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-get-automatic-https-rewrites-setting

                        GET Get Automatic HTTPS Rewrites setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Enable the Automatic HTTPS Rewrites feature for this zone.

                        GET zones/:zone_identifier/settings/automatic_https_rewrites
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/automatic_https_rewrites" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-get-browser-cache-ttl-setting

                        GET Get Browser Cache TTL setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times specified by your server. (https://support.cloudflare.com/hc/en-us/articles/200168276)

                        GET zones/:zone_identifier/settings/browser_cache_ttl
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/browser_cache_ttl" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "browser_cache_ttl",
                            "value": 14400,
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-browser-check-setting

                        GET Get Browser Check setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Browser Integrity Check is similar to Bad Behavior and looks for common HTTP headers abused most commonly by spammers and denies access to your page. It will also challenge visitors that do not have a user agent or a non standard user agent (also commonly used by abuse bots, crawlers or visitors). (https://support.cloudflare.com/hc/en-us/articles/200170086)

                        GET zones/:zone_identifier/settings/browser_check
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/browser_check" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "browser_check",
                            "value": "on",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-cache-level-setting

                        GET Get Cache Level setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Cache Level functions based off the setting level. The basic setting will cache most static resources (i.e., css, images, and JavaScript). The simplified setting will ignore the query string when delivering a cached resource. The aggressive setting will cache all static resources, including ones with a query string. (https://support.cloudflare.com/hc/en-us/articles/200168256)

                        GET zones/:zone_identifier/settings/cache_level
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/cache_level" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "cache_level",
                            "value": "aggressive",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-challenge-ttl-setting

                        GET Get Challenge TTL setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Specify how long a visitor is allowed access to your site after successfully completing a challenge (such as a CAPTCHA). After the TTL has expired the visitor will have to complete a new challenge. We recommend a 15 - 45 minute setting and will attempt to honor any setting above 45 minutes. (https://support.cloudflare.com/hc/en-us/articles/200170136)

                        GET zones/:zone_identifier/settings/challenge_ttl
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/challenge_ttl" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "challenge_ttl",
                            "value": 1800,
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-development-mode-setting

                        GET Get Development Mode setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Development Mode temporarily allows you to enter development mode for your websites if you need to make changes to your site. This will bypass Cloudflare's accelerated cache and slow down your site, but is useful if you are making changes to cacheable content (like images, css, or JavaScript) and would like to see those changes right away. Once entered, development mode will last for 3 hours and then automatically toggle off.

                        GET zones/:zone_identifier/settings/development_mode
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/development_mode" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "development_mode",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z",
                            "time_remaining": 3600
                          }
                        }
                        zone-settings-get-email-obfuscation-setting

                        GET Get Email Obfuscation setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Encrypt email adresses on your web page from bots, while keeping them visible to humans. (https://support.cloudflare.com/hc/en-us/articles/200170016)

                        GET zones/:zone_identifier/settings/email_obfuscation
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/email_obfuscation" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "email_obfuscation",
                            "value": "on",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-hotlink-protection-setting

                        GET Get Hotlink Protection setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        When enabled, the Hotlink Protection option ensures that other sites cannot suck up your bandwidth by building pages that use images hosted on your site. Anytime a request for an image on your site hits Cloudflare, we check to ensure that it's not another site requesting them. People will still be able to download and view images from your page, but other sites won't be able to steal them for use on their own pages. (https://support.cloudflare.com/hc/en-us/articles/200170026)

                        GET zones/:zone_identifier/settings/hotlink_protection
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/hotlink_protection" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "hotlink_protection",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-ip-geolocation-setting

                        GET Get IP Geolocation setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Enable IP Geolocation to have Cloudflare geolocate visitors to your website and pass the country code to you. (https://support.cloudflare.com/hc/en-us/articles/200168236)

                        GET zones/:zone_identifier/settings/ip_geolocation
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/ip_geolocation" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "ip_geolocation",
                            "value": "on",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-ipv6-setting

                        GET Get IPv6 setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Enable IPv6 on all subdomains that are Cloudflare enabled. (https://support.cloudflare.com/hc/en-us/articles/200168586)

                        GET zones/:zone_identifier/settings/ipv6
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/ipv6" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "ipv6",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-minify-setting

                        GET Get Minify setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Automatically minify certain assets for your website (https://support.cloudflare.com/hc/en-us/articles/200168196).

                        GET zones/:zone_identifier/settings/minify
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/minify" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "minify",
                            "value": {
                              "css": "off",
                              "html": "off",
                              "js": "off"
                            },
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-mobile-redirect-setting

                        GET Get Mobile Redirect setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Automatically redirect visitors on mobile devices to a mobile-optimized subdomain (https://support.cloudflare.com/hc/en-us/articles/200168336).

                        GET zones/:zone_identifier/settings/mobile_redirect
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/mobile_redirect" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "mobile_redirect",
                            "value": {
                              "status": "off",
                              "mobile_subdomain": "m",
                              "strip_uri": false
                            },
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-mirage-setting

                        GET Get Mirage setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Automatically optimize image loading for website visitors on mobile devices (http://blog.cloudflare.com/mirage2-solving-mobile-speed).

                        GET zones/:zone_identifier/settings/mirage
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/mirage" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "mirage",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-enable-error-pages-on-setting

                        GET Get Enable Error Pages On setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Cloudflare will proxy customer error pages on any 502,504 errors on origin server instead of showing a default Cloudflare error page. This does not apply to 522 errors and is limited to Enterprise Zones.

                        GET zones/:zone_identifier/settings/origin_error_page_pass_thru
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/origin_error_page_pass_thru" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-get-opportunistic-encryption-setting

                        GET Get Opportunistic Encryption setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Enable the Opportunistic Encryption feature for this zone.

                        GET zones/:zone_identifier/settings/opportunistic_encryption
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/opportunistic_encryption" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "opportunistic_encryption",
                            "value": "on",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-polish-setting

                        GET Get Polish setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Strips metadata and compresses your images for faster page load times. Basic (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster image loading. Larger JPEGs are converted to progressive images, loading a lower-resolution image first and ending in a higher-resolution version. Not recommended for hi-res photography sites.

                        GET zones/:zone_identifier/settings/polish
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/polish" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "polish",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-webp-setting

                        GET Get WebP setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        When the client requesting the image supports the WebP image codec, Cloudflare will serve a WebP version of the image when WebP offers a performance advantage over the original image format.

                        GET zones/:zone_identifier/settings/webp
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/webp" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "webp",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-brotli-setting

                        GET Get Brotli setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        When the client requesting an asset supports the brotli compression algorithm, Cloudflare will serve a brotli compressed version of the asset.

                        GET zones/:zone_identifier/settings/brotli
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/brotli" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "brotli",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-prefetch-preload-setting

                        GET Get Prefetch Preload setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Cloudflare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones.

                        GET zones/:zone_identifier/settings/prefetch_preload
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/prefetch_preload" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-get-privacy-pass-setting

                        GET Get Privacy Pass setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Privacy Pass is a browser extension developed by the Privacy Pass Team to improve the browsing experience for your visitors. Enabling Privacy Pass will reduce the number of CAPTCHAs shown to your visitors. (https://support.cloudflare.com/hc/en-us/articles/115001992652-Privacy-Pass)

                        GET zones/:zone_identifier/settings/privacy_pass
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/privacy_pass" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "privacy_pass",
                            "value": "on",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-response-buffering-setting

                        GET Get Response Buffering setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Enables or disables buffering of responses from the proxied server. Cloudflare may buffer the whole payload to deliver it at once to the client versus allowing it to be delivered in chunks. By default, the proxied server streams directly and is not buffered by Cloudflare. This is limited to Enterprise Zones.

                        GET zones/:zone_identifier/settings/response_buffering
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/response_buffering" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-get-rocket-loader-setting

                        GET Get Rocket Loader setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Rocket Loader is a general-purpose asynchronous JavaScript loader coupled with a lightweight virtual browser which can safely run any JavaScript code after window.onload. Turning on Rocket Loader will immediately improve a web page's window.onload time (assuming there is JavaScript on the page), which can have a positive impact on your Google search ranking. Automatic Mode: Rocket Loader will automatically run on the JavaScript resources on your site, with no configuration required after turning on automatic mode. Manual Mode: In order to have Rocket Loader execute for a particular script, you must add the following attribute to the script tag: "data-cfasync='true'". As your page passes through Cloudflare, we'll enable Rocket Loader for that particular script. All other JavaScript will continue to execute without Cloudflare touching the script. (https://support.cloudflare.com/hc/en-us/articles/200168056)

                        GET zones/:zone_identifier/settings/rocket_loader
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/rocket_loader" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "rocket_loader",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-security-header-hsts-setting

                        GET Get Security Header (HSTS) setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Cloudflare security header for a zone.

                        GET zones/:zone_identifier/settings/security_header
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/security_header" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "security_header",
                            "value": {
                              "strict_transport_security": {
                                "enabled": true,
                                "max_age": 86400,
                                "include_subdomains": true,
                                "nosniff": true
                              }
                            },
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-security-level-setting

                        GET Get Security Level setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. If you choose to customize an individual security setting, the profile will become Custom. (https://support.cloudflare.com/hc/en-us/articles/200170056)

                        GET zones/:zone_identifier/settings/security_level
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/security_level" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "security_level",
                            "value": "medium",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-server-side-exclude-setting

                        GET Get Server Side Exclude setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        If there is sensitive content on your website that you want visible to real visitors, but that you want to hide from suspicious visitors, all you have to do is wrap the content with Cloudflare SSE tags. Wrap any content that you want to be excluded from suspicious visitors in the following SSE tags: <!--sse--><!--/sse-->. For example: <!--sse--> Bad visitors won't see my phone number, 555-555-5555 <!--/sse-->. Note: SSE only will work with HTML. If you have HTML minification enabled, you won't see the SSE tags in your HTML source when it's served through Cloudflare. SSE will still function in this case, as Cloudflare's HTML minification and SSE functionality occur on-the-fly as the resource moves through our network to the visitor's computer. (https://support.cloudflare.com/hc/en-us/articles/200170036)

                        GET zones/:zone_identifier/settings/server_side_exclude
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/server_side_exclude" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "server_side_exclude",
                            "value": "on",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-enable-query-string-sort-setting

                        GET Get Enable Query String Sort setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Cloudflare will treat files with the same query strings as the same file in cache, regardless of the order of the query strings. This is limited to Enterprise Zones.

                        GET zones/:zone_identifier/settings/sort_query_string_for_cache
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/sort_query_string_for_cache" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-get-ssl-setting

                        GET Get SSL setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        SSL encrypts your visitor's connection and safeguards credit card numbers and other personal data to and from your website. SSL can take up to 5 minutes to fully activate. Requires Cloudflare active on your root domain or www domain. Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare and your web server (all HTTP traffic). Flexible: SSL between the visitor and Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and your web server. You don't need to have an SSL cert on your web server, but your vistors will still see the site as being HTTPS enabled. Full: SSL between the visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and your web server. You'll need to have your own SSL cert or self-signed cert at the very least. Full (Strict): SSL between the visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and your web server. You'll need to have a valid SSL certificate installed on your web server. This certificate must be signed by a certificate authority, have an expiration date in the future, and respond for the request domain name (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416)

                        GET zones/:zone_identifier/settings/ssl
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/ssl" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "ssl",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-zone-enable-tls-1.2-setting

                        GET Get Zone Enable TLS 1.2 setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Enable Crypto TLS 1.2 feature for this zone and prevent use of previous versions. This is limited to Enterprise or Business Zones.

                        GET zones/:zone_identifier/settings/tls_1_2_only
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/tls_1_2_only" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-get-zone-enable-tls-1.3-setting

                        GET Get Zone Enable TLS 1.3 setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Enable Crypto TLS 1.3 feature for this zone.

                        GET zones/:zone_identifier/settings/tls_1_3
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/tls_1_3" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-get-tls-client-auth-setting

                        GET Get TLS Client Auth setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        TLS Client Auth requires Cloudflare to connect to your origin server using a client certificate (Enterprise Only)

                        GET zones/:zone_identifier/settings/tls_client_auth
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/tls_client_auth" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "tls_client_auth",
                            "value": "on",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-true-client-ip-setting

                        GET Get True Client IP setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Allows customer to continue to use True Client IP (Akamai feature) in the headers we send to the origin. This is limited to Enterprise Zones.

                        GET zones/:zone_identifier/settings/true_client_ip_header
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/true_client_ip_header" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-get-web-application-firewall-waf-setting

                        GET Get Web Application Firewall (WAF) setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        The WAF examines HTTP requests to your website. It inspects both GET and POST requests and applies rules to help filter out illegitimate traffic from legitimate website visitors. The Cloudflare WAF inspects website addresses or URLs to detect anything out of the ordinary. If the Cloudflare WAF determines suspicious user behavior, then the WAF will ‘challenge’ the web visitor with a page that asks them to submit a CAPTCHA successfully to continue their action. If the challenge is failed, the action will be stopped. What this means is that Cloudflare’s WAF will block any traffic identified as illegitimate before it reaches your origin web server. (https://support.cloudflare.com/hc/en-us/articles/200172016)

                        GET zones/:zone_identifier/settings/waf
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/waf" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "waf",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-http2-setting

                        GET Get HTTP2 setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Value of the HTTP2 setting

                        GET zones/:zone_identifier/settings/http2
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/http2" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "http2",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-pseudo-ipv4-setting

                        GET Get Pseudo IPv4 setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        Value of the Pseudo IPv4 setting

                        GET zones/:zone_identifier/settings/pseudo_ipv4
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/pseudo_ipv4" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "pseudo_ipv4",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-get-websockets-setting

                        GET Get WebSockets setting permission needed: #zone_settings:read
                        • free
                        • pro
                        • business
                        • enterprise

                        WebSockets are open connections sustained between the client and the origin server. Inside a WebSockets connection, the client and the origin can pass data back and forth without having to reestablish sessions. This makes exchanging data within a WebSockets connection fast. WebSockets are often used for real-time applications such as live chat and gaming. (https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-Cloudflare-with-WebSockets-)

                        GET zones/:zone_identifier/settings/websockets
                        cURL (example)
                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/websockets" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json"
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "websockets",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-edit-zone-settings-info

                        PATCH Edit zone settings info permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Edit settings for a zone

                        PATCH zones/:zone_identifier/settings

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        items
                        array

                        One or more zone setting objects. Must contain an ID and a value.

                        [ { "id": "always_online", "value": "on" }, { "id": "browser_cache_ttl", "value": 18000 }, { "id": "ip_geolocation", "value": "off" } ]
                        An array with items in the following form:
                        • min items: 1
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"items":[{"id":"always_online","value":"on"},{"id":"browser_cache_ttl","value":18000},{"id":"ip_geolocation","value":"off"}]}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": [
                            {
                              "id": "always_online",
                              "value": "on",
                              "editable": true,
                              "modified_on": "2014-01-01T05:20:00.12345Z"
                            }
                          ],
                          "result_info": {
                            "page": 1,
                            "per_page": 20,
                            "count": 1,
                            "total_count": 2000
                          }
                        }
                        zone-settings-change-always-online-setting

                        PATCH Change Always Online setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        When enabled, Always Online will serve pages from our cache if your server is offline (https://support.cloudflare.com/hc/en-us/articles/200168006)

                        PATCH zones/:zone_identifier/settings/always_online

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        "on"
                        • default value: on
                        • valid values: on, off
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/always_online" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":"on"}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "always_online",
                            "value": "on",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-change-always-use-https-setting

                        PATCH Change Always Use HTTPS setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Reply to all requests for URLs that use "http" with a 301 redirect to the equivalent "https" URL. If you only want to redirect for a subset of requests, consider creating an "Always use HTTPS" page rule.

                        PATCH zones/:zone_identifier/settings/always_use_https

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        "off"
                        • default value: off
                        • valid values: on, off
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/always_use_https" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":"off"}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-change-automatic-https-rewrites-setting

                        PATCH Change Automatic HTTPS Rewrites setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Enable the Automatic HTTPS Rewrites feature for this zone.

                        PATCH zones/:zone_identifier/settings/automatic_https_rewrites

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Enable the Automatic HTTPS Rewrites feature for this zone.

                        "off"
                        An object with the following properties:
                        • default value: off
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/automatic_https_rewrites" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":"off"}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-change-browser-cache-ttl-setting

                        PATCH Change Browser Cache TTL setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times specified by your server. (https://support.cloudflare.com/hc/en-us/articles/200168276)

                        PATCH zones/:zone_identifier/settings/browser_cache_ttl

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        14400
                        • default value: 14400
                        • valid values: 30, 60, 300, 1200, 1800, 3600, 7200, 10800, 14400, 18000, 28800, 43200, 57600, 72000, 86400, 172800, 259200, 345600, 432000, 691200, 1382400, 2073600, 2678400, 5356800, 16070400, 31536000
                        • notes: The minimum TTL available depends on the plan level of the zone. (Enterprise = 30, Business = 1800, Pro = 1800, Free = 1800)
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/browser_cache_ttl" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":14400}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "browser_cache_ttl",
                            "value": 14400,
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-change-browser-check-setting

                        PATCH Change Browser Check setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Browser Integrity Check is similar to Bad Behavior and looks for common HTTP headers abused most commonly by spammers and denies access to your page. It will also challenge visitors that do not have a user agent or a non standard user agent (also commonly used by abuse bots, crawlers or visitors). (https://support.cloudflare.com/hc/en-us/articles/200170086)

                        PATCH zones/:zone_identifier/settings/browser_check

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        "on"
                        • default value: on
                        • valid values: on, off
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/browser_check" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":"on"}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "browser_check",
                            "value": "on",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-change-cache-level-setting

                        PATCH Change Cache Level setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Cache Level functions based off the setting level. The basic setting will cache most static resources (i.e., css, images, and JavaScript). The simplified setting will ignore the query string when delivering a cached resource. The aggressive setting will cache all static resources, including ones with a query string. (https://support.cloudflare.com/hc/en-us/articles/200168256)

                        PATCH zones/:zone_identifier/settings/cache_level

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        "aggressive"
                        • default value: aggressive
                        • valid values: aggressive, basic, simplified
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/cache_level" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":"aggressive"}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "cache_level",
                            "value": "aggressive",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-change-challenge-ttl-setting

                        PATCH Change Challenge TTL setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Specify how long a visitor is allowed access to your site after successfully completing a challenge (such as a CAPTCHA). After the TTL has expired the visitor will have to complete a new challenge. We recommend a 15 - 45 minute setting and will attempt to honor any setting above 45 minutes. (https://support.cloudflare.com/hc/en-us/articles/200170136)

                        PATCH zones/:zone_identifier/settings/challenge_ttl

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        1800
                        • default value: 1800
                        • valid values: 300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/challenge_ttl" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":1800}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "challenge_ttl",
                            "value": 1800,
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-change-development-mode-setting

                        PATCH Change Development Mode setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Development Mode temporarily allows you to enter development mode for your websites if you need to make changes to your site. This will bypass Cloudflare's accelerated cache and slow down your site, but is useful if you are making changes to cacheable content (like images, css, or JavaScript) and would like to see those changes right away. Once entered, development mode will last for 3 hours and then automatically toggle off.

                        PATCH zones/:zone_identifier/settings/development_mode

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        "off"
                        • default value: off
                        • valid values: on, off
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/development_mode" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":"off"}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "development_mode",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z",
                            "time_remaining": 3600
                          }
                        }
                        zone-settings-change-email-obfuscation-setting

                        PATCH Change Email Obfuscation setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Encrypt email adresses on your web page from bots, while keeping them visible to humans. (https://support.cloudflare.com/hc/en-us/articles/200170016)

                        PATCH zones/:zone_identifier/settings/email_obfuscation

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        "on"
                        • default value: on
                        • valid values: on, off
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/email_obfuscation" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":"on"}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "email_obfuscation",
                            "value": "on",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-change-enable-error-pages-on-setting

                        PATCH Change Enable Error Pages On setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Cloudflare will proxy customer error pages on any 502,504 errors on origin server instead of showing a default Cloudflare error page. This does not apply to 522 errors and is limited to Enterprise Zones.

                        PATCH zones/:zone_identifier/settings/origin_error_page_pass_thru

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        "off"
                        • default value: off
                        • valid values: on, off
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/origin_error_page_pass_thru" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":"off"}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-change-enable-query-string-sort-setting

                        PATCH Change Enable Query String Sort setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Cloudflare will treat files with the same query strings as the same file in cache, regardless of the order of the query strings. This is limited to Enterprise Zones.

                        PATCH zones/:zone_identifier/settings/sort_query_string_for_cache

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        "off"
                        • default value: off
                        • valid values: on, off
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/sort_query_string_for_cache" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":"off"}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": "off"
                        }
                        zone-settings-change-hotlink-protection-setting

                        PATCH Change Hotlink Protection setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        When enabled, the Hotlink Protection option ensures that other sites cannot suck up your bandwidth by building pages that use images hosted on your site. Anytime a request for an image on your site hits Cloudflare, we check to ensure that it's not another site requesting them. People will still be able to download and view images from your page, but other sites won't be able to steal them for use on their own pages. (https://support.cloudflare.com/hc/en-us/articles/200170026)

                        PATCH zones/:zone_identifier/settings/hotlink_protection

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        "off"
                        • default value: off
                        • valid values: on, off
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/hotlink_protection" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":"off"}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "hotlink_protection",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-change-ip-geolocation-setting

                        PATCH Change IP Geolocation setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Enable IP Geolocation to have Cloudflare geolocate visitors to your website and pass the country code to you. (https://support.cloudflare.com/hc/en-us/articles/200168236)

                        PATCH zones/:zone_identifier/settings/ip_geolocation

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        "on"
                        • default value: on
                        • valid values: on, off
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/ip_geolocation" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":"on"}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "ip_geolocation",
                            "value": "on",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-change-ipv6-setting

                        PATCH Change IPv6 setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Enable IPv6 on all subdomains that are Cloudflare enabled. (https://support.cloudflare.com/hc/en-us/articles/200168586)

                        PATCH zones/:zone_identifier/settings/ipv6

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value

                        Value of the zone setting

                        "off"
                        • default value: off
                        • valid values: off, on
                        cURL (example)
                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/ipv6" \
                             -H "X-Auth-Email: [email protected]" \
                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                             -H "Content-Type: application/json" \
                             --data '{"value":"off"}'
                        Response (example)
                        {
                          "success": true,
                          "errors": [],
                          "messages": [],
                          "result": {
                            "id": "ipv6",
                            "value": "off",
                            "editable": true,
                            "modified_on": "2014-01-01T05:20:00.12345Z"
                          }
                        }
                        zone-settings-change-minify-setting

                        PATCH Change Minify setting permission needed: #zone_settings:edit
                        • free
                        • pro
                        • business
                        • enterprise

                        Automatically minify certain assets for your website (https://support.cloudflare.com/hc/en-us/articles/200168196).

                        PATCH zones/:zone_identifier/settings/minify

                        Required parameters

                        Name /typeDescription /exampleConstraints
                        value
                        object

                        Value of the zone setting

                        { "css": "off", "html": "off", "js": "off" }
                        An object with the following properties:
                          cURL (example)
                          curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/minify" \
                               -H "X-Auth-Email: [email protected]" \
                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                               -H "Content-Type: application/json" \
                               --data '{"value":{"css":"off","html":"off","js":"off"}}'
                          Response (example)
                          {
                            "success": true,
                            "errors": [],
                            "messages": [],
                            "result": {
                              "id": "minify",
                              "value": {
                                "css": "off",
                                "html": "off",
                                "js": "off"
                              },
                              "editable": true,
                              "modified_on": "2014-01-01T05:20:00.12345Z"
                            }
                          }
                          zone-settings-change-mobile-redirect-setting

                          PATCH Change Mobile Redirect setting permission needed: #zone_settings:edit
                          • free
                          • pro
                          • business
                          • enterprise

                          Automatically redirect visitors on mobile devices to a mobile-optimized subdomain (https://support.cloudflare.com/hc/en-us/articles/200168336).

                          PATCH zones/:zone_identifier/settings/mobile_redirect

                          Required parameters

                          Name /typeDescription /exampleConstraints
                          value
                          object

                          Value of the zone setting

                          { "status": "off", "mobile_subdomain": "m", "strip_uri": false }
                          An object with the following properties:
                            cURL (example)
                            curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/mobile_redirect" \
                                 -H "X-Auth-Email: [email protected]" \
                                 -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                 -H "Content-Type: application/json" \
                                 --data '{"value":{"status":"off","mobile_subdomain":"m","strip_uri":false}}'
                            Response (example)
                            {
                              "success": true,
                              "errors": [],
                              "messages": [],
                              "result": {
                                "id": "mobile_redirect",
                                "value": {
                                  "status": "off",
                                  "mobile_subdomain": "m",
                                  "strip_uri": false
                                },
                                "editable": true,
                                "modified_on": "2014-01-01T05:20:00.12345Z"
                              }
                            }
                            zone-settings-change-mirage-setting

                            PATCH Change Mirage setting permission needed: #zone_settings:edit
                            • free
                            • pro
                            • business
                            • enterprise

                            Automatically optimize image loading for website visitors on mobile devices (http://blog.cloudflare.com/mirage2-solving-mobile-speed).

                            PATCH zones/:zone_identifier/settings/mirage

                            Required parameters

                            Name /typeDescription /exampleConstraints
                            value

                            Value of the zone setting

                            "off"
                            • default value: off
                            • valid values: on, off
                            cURL (example)
                            curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/mirage" \
                                 -H "X-Auth-Email: [email protected]" \
                                 -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                 -H "Content-Type: application/json" \
                                 --data '{"value":"off"}'
                            Response (example)
                            {
                              "success": true,
                              "errors": [],
                              "messages": [],
                              "result": {
                                "id": "mirage",
                                "value": "off",
                                "editable": true,
                                "modified_on": "2014-01-01T05:20:00.12345Z"
                              }
                            }
                            zone-settings-change-opportunistic-encryption-setting

                            PATCH Change Opportunistic Encryption setting permission needed: #zone_settings:edit
                            • free
                            • pro
                            • business
                            • enterprise

                            Enable the Opportunistic Encryption feature for this zone.

                            PATCH zones/:zone_identifier/settings/opportunistic_encryption

                            Required parameters

                            Name /typeDescription /exampleConstraints
                            value

                            Enable the Opportunistic Encryption feature for this zone.

                            { "id": "opportunistic_encryption", "value": "on", "editable": true, "modified_on": "2014-01-01T05:20:00.12345Z" }
                            An object with the following properties:
                              cURL (example)
                              curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/opportunistic_encryption" \
                                   -H "X-Auth-Email: [email protected]" \
                                   -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                   -H "Content-Type: application/json" \
                                   --data '{"value":{"id":"opportunistic_encryption","value":"on","editable":true,"modified_on":"2014-01-01T05:20:00.12345Z"}}'
                              Response (example)
                              {
                                "success": true,
                                "errors": [],
                                "messages": [],
                                "result": {
                                  "id": "opportunistic_encryption",
                                  "value": "on",
                                  "editable": true,
                                  "modified_on": "2014-01-01T05:20:00.12345Z"
                                }
                              }
                              zone-settings-change-polish-setting

                              PATCH Change Polish setting permission needed: #zone_settings:edit
                              • free
                              • pro
                              • business
                              • enterprise

                              Strips metadata and compresses your images for faster page load times. Basic (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on visual quality. Basic + JPEG (Lossy): Further reduce the size of JPEG files for faster image loading. Larger JPEGs are converted to progressive images, loading a lower-resolution image first and ending in a higher-resolution version. Not recommended for hi-res photography sites.

                              PATCH zones/:zone_identifier/settings/polish

                              Required parameters

                              Name /typeDescription /exampleConstraints
                              value

                              Value of the zone setting

                              "off"
                              • default value: off
                              • valid values: off, lossless, lossy
                              cURL (example)
                              curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/polish" \
                                   -H "X-Auth-Email: [email protected]" \
                                   -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                   -H "Content-Type: application/json" \
                                   --data '{"value":"off"}'
                              Response (example)
                              {
                                "success": true,
                                "errors": [],
                                "messages": [],
                                "result": {
                                  "id": "polish",
                                  "value": "off",
                                  "editable": true,
                                  "modified_on": "2014-01-01T05:20:00.12345Z"
                                }
                              }
                              zone-settings-change-webp-setting

                              PATCH Change WebP setting permission needed: #zone_settings:edit
                              • free
                              • pro
                              • business
                              • enterprise

                              When the client requesting the image supports the WebP image codec, Cloudflare will serve a WebP version of the image when WebP offers a performance advantage over the original image format.

                              PATCH zones/:zone_identifier/settings/webp

                              Required parameters

                              Name /typeDescription /exampleConstraints
                              value

                              Value of the zone setting

                              "off"
                              • default value: off
                              • valid values: off, on
                              cURL (example)
                              curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/webp" \
                                   -H "X-Auth-Email: [email protected]" \
                                   -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                   -H "Content-Type: application/json" \
                                   --data '{"value":"off"}'
                              Response (example)
                              {
                                "success": true,
                                "errors": [],
                                "messages": [],
                                "result": {
                                  "id": "webp",
                                  "value": "off",
                                  "editable": true,
                                  "modified_on": "2014-01-01T05:20:00.12345Z"
                                }
                              }
                              zone-settings-change-brotli-setting

                              PATCH Change Brotli setting permission needed: #zone_settings:edit
                              • free
                              • pro
                              • business
                              • enterprise

                              When the client requesting an asset supports the brotli compression algorithm, Cloudflare will serve a brotli compressed version of the asset.

                              PATCH zones/:zone_identifier/settings/brotli

                              Required parameters

                              Name /typeDescription /exampleConstraints
                              value

                              Value of the zone setting

                              "off"
                              • default value: off
                              • valid values: off, on
                              cURL (example)
                              curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/brotli" \
                                   -H "X-Auth-Email: [email protected]" \
                                   -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                   -H "Content-Type: application/json" \
                                   --data '{"value":"off"}'
                              Response (example)
                              {
                                "success": true,
                                "errors": [],
                                "messages": [],
                                "result": {
                                  "id": "brotli",
                                  "value": "off",
                                  "editable": true,
                                  "modified_on": "2014-01-01T05:20:00.12345Z"
                                }
                              }
                              zone-settings-change-prefetch-preload-setting

                              PATCH Change Prefetch Preload setting permission needed: #zone_settings:edit
                              • free
                              • pro
                              • business
                              • enterprise

                              Cloudflare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones.

                              PATCH zones/:zone_identifier/settings/prefetch_preload

                              Required parameters

                              Name /typeDescription /exampleConstraints
                              value

                              Value of the zone setting

                              "off"
                              • default value: off
                              • valid values: on, off
                              cURL (example)
                              curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/prefetch_preload" \
                                   -H "X-Auth-Email: [email protected]" \
                                   -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                   -H "Content-Type: application/json" \
                                   --data '{"value":"off"}'
                              Response (example)
                              {
                                "success": true,
                                "errors": [],
                                "messages": [],
                                "result": "off"
                              }
                              zone-settings-change-privacy-pass-setting

                              PATCH Change Privacy Pass setting permission needed: #zone_settings:edit
                              • free
                              • pro
                              • business
                              • enterprise

                              Privacy Pass is a browser extension developed by the Privacy Pass Team to improve the browsing experience for your visitors. Enabling Privacy Pass will reduce the number of CAPTCHAs shown to your visitors. (https://support.cloudflare.com/hc/en-us/articles/115001992652-Privacy-Pass)

                              PATCH zones/:zone_identifier/settings/privacy_pass

                              Required parameters

                              Name /typeDescription /exampleConstraints
                              value

                              Value of the zone setting

                              "on"
                              • default value: on
                              • valid values: on, off
                              cURL (example)
                              curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/privacy_pass" \
                                   -H "X-Auth-Email: [email protected]" \
                                   -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                   -H "Content-Type: application/json" \
                                   --data '{"value":"on"}'
                              Response (example)
                              {
                                "success": true,
                                "errors": [],
                                "messages": [],
                                "result": {
                                  "id": "privacy_pass",
                                  "value": "on",
                                  "editable": true,
                                  "modified_on": "2014-01-01T05:20:00.12345Z"
                                }
                              }
                              zone-settings-change-response-buffering-setting

                              PATCH Change Response Buffering setting permission needed: #zone_settings:edit
                              • free
                              • pro
                              • business
                              • enterprise

                              Enables or disables buffering of responses from the proxied server. Cloudflare may buffer the whole payload to deliver it at once to the client versus allowing it to be delivered in chunks. By default, the proxied server streams directly and is not buffered by Cloudflare. This is limited to Enterprise Zones.

                              PATCH zones/:zone_identifier/settings/response_buffering

                              Required parameters

                              Name /typeDescription /exampleConstraints
                              value

                              Value of the zone setting

                              "off"
                              • default value: off
                              • valid values: on, off
                              cURL (example)
                              curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/response_buffering" \
                                   -H "X-Auth-Email: [email protected]" \
                                   -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                   -H "Content-Type: application/json" \
                                   --data '{"value":"off"}'
                              Response (example)
                              {
                                "success": true,
                                "errors": [],
                                "messages": [],
                                "result": "off"
                              }
                              zone-settings-change-rocket-loader-setting

                              PATCH Change Rocket Loader setting permission needed: #zone_settings:edit
                              • free
                              • pro
                              • business
                              • enterprise

                              Rocket Loader is a general-purpose asynchronous JavaScript loader coupled with a lightweight virtual browser which can safely run any JavaScript code after window.onload. Turning on Rocket Loader will immediately improve a web page's window.onload time (assuming there is JavaScript on the page), which can have a positive impact on your Google search ranking. Automatic Mode: Rocket Loader will automatically run on the JavaScript resources on your site, with no configuration required after turning on automatic mode. Manual Mode: In order to have Rocket Loader execute for a particular script, you must add the following attribute to the script tag: "data-cfasync='true'". As your page passes through Cloudflare, we'll enable Rocket Loader for that particular script. All other JavaScript will continue to execute without Cloudflare touching the script. (https://support.cloudflare.com/hc/en-us/articles/200168056)

                              PATCH zones/:zone_identifier/settings/rocket_loader

                              Required parameters

                              Name /typeDescription /exampleConstraints
                              value

                              Value of the zone setting

                              "off"
                              • default value: off
                              • valid values: on, off, manual
                              cURL (example)
                              curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/rocket_loader" \
                                   -H "X-Auth-Email: [email protected]" \
                                   -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                   -H "Content-Type: application/json" \
                                   --data '{"value":"off"}'
                              Response (example)
                              {
                                "success": true,
                                "errors": [],
                                "messages": [],
                                "result": {
                                  "id": "rocket_loader",
                                  "value": "off",
                                  "editable": true,
                                  "modified_on": "2014-01-01T05:20:00.12345Z"
                                }
                              }
                              zone-settings-change-security-header-hsts-setting

                              PATCH Change Security Header (HSTS) setting permission needed: #zone_settings:edit
                              • free
                              • pro
                              • business
                              • enterprise

                              Cloudflare security header for a zone.

                              PATCH zones/:zone_identifier/settings/security_header

                              Required parameters

                              Name /typeDescription /exampleConstraints
                              value
                              object
                              { "strict_transport_security": { "enabled": true, "max_age": 86400, "include_subdomains": true, "nosniff": true } }
                              An object with the following properties:
                                cURL (example)
                                curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/security_header" \
                                     -H "X-Auth-Email: [email protected]" \
                                     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                     -H "Content-Type: application/json" \
                                     --data '{"value":{"strict_transport_security":{"enabled":true,"max_age":86400,"include_subdomains":true,"nosniff":true}}}'
                                Response (example)
                                {
                                  "success": true,
                                  "errors": [],
                                  "messages": [],
                                  "result": {
                                    "id": "security_header",
                                    "value": {
                                      "strict_transport_security": {
                                        "enabled": true,
                                        "max_age": 86400,
                                        "include_subdomains": true,
                                        "nosniff": true
                                      }
                                    },
                                    "editable": true,
                                    "modified_on": "2014-01-01T05:20:00.12345Z"
                                  }
                                }
                                zone-settings-change-security-level-setting

                                PATCH Change Security Level setting permission needed: #zone_settings:edit
                                • free
                                • pro
                                • business
                                • enterprise

                                Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. If you choose to customize an individual security setting, the profile will become Custom. (https://support.cloudflare.com/hc/en-us/articles/200170056)

                                PATCH zones/:zone_identifier/settings/security_level

                                Required parameters

                                Name /typeDescription /exampleConstraints
                                value

                                Value of the zone setting

                                "medium"
                                • default value: medium
                                • valid values: essentially_off, low, medium, high, under_attack
                                cURL (example)
                                curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/security_level" \
                                     -H "X-Auth-Email: [email protected]" \
                                     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                     -H "Content-Type: application/json" \
                                     --data '{"value":"medium"}'
                                Response (example)
                                {
                                  "success": true,
                                  "errors": [],
                                  "messages": [],
                                  "result": {
                                    "id": "security_level",
                                    "value": "medium",
                                    "editable": true,
                                    "modified_on": "2014-01-01T05:20:00.12345Z"
                                  }
                                }
                                zone-settings-change-server-side-exclude-setting

                                PATCH Change Server Side Exclude setting permission needed: #zone_settings:edit
                                • free
                                • pro
                                • business
                                • enterprise

                                If there is sensitive content on your website that you want visible to real visitors, but that you want to hide from suspicious visitors, all you have to do is wrap the content with Cloudflare SSE tags. Wrap any content that you want to be excluded from suspicious visitors in the following SSE tags: <!--sse--><!--/sse-->. For example: <!--sse--> Bad visitors won't see my phone number, 555-555-5555 <!--/sse-->. Note: SSE only will work with HTML. If you have HTML minification enabled, you won't see the SSE tags in your HTML source when it's served through Cloudflare. SSE will still function in this case, as Cloudflare's HTML minification and SSE functionality occur on-the-fly as the resource moves through our network to the visitor's computer. (https://support.cloudflare.com/hc/en-us/articles/200170036)

                                PATCH zones/:zone_identifier/settings/server_side_exclude

                                Required parameters

                                Name /typeDescription /exampleConstraints
                                value

                                Value of the zone setting

                                "on"
                                • default value: on
                                • valid values: on, off
                                cURL (example)
                                curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/server_side_exclude" \
                                     -H "X-Auth-Email: [email protected]" \
                                     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                     -H "Content-Type: application/json" \
                                     --data '{"value":"on"}'
                                Response (example)
                                {
                                  "success": true,
                                  "errors": [],
                                  "messages": [],
                                  "result": {
                                    "id": "server_side_exclude",
                                    "value": "on",
                                    "editable": true,
                                    "modified_on": "2014-01-01T05:20:00.12345Z"
                                  }
                                }
                                zone-settings-change-ssl-setting

                                PATCH Change SSL setting permission needed: #zone_settings:edit
                                • free
                                • pro
                                • business
                                • enterprise

                                SSL encrypts your visitor's connection and safeguards credit card numbers and other personal data to and from your website. SSL can take up to 5 minutes to fully activate. Requires Cloudflare active on your root domain or www domain. Off: no SSL between the visitor and Cloudflare, and no SSL between Cloudflare and your web server (all HTTP traffic). Flexible: SSL between the visitor and Cloudflare -- visitor sees HTTPS on your site, but no SSL between Cloudflare and your web server. You don't need to have an SSL cert on your web server, but your vistors will still see the site as being HTTPS enabled. Full: SSL between the visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and your web server. You'll need to have your own SSL cert or self-signed cert at the very least. Full (Strict): SSL between the visitor and Cloudflare -- visitor sees HTTPS on your site, and SSL between Cloudflare and your web server. You'll need to have a valid SSL certificate installed on your web server. This certificate must be signed by a certificate authority, have an expiration date in the future, and respond for the request domain name (hostname). (https://support.cloudflare.com/hc/en-us/articles/200170416)

                                PATCH zones/:zone_identifier/settings/ssl

                                Required parameters

                                Name /typeDescription /exampleConstraints
                                value

                                Value of the zone setting

                                "off"
                                • default value: off
                                • valid values: off, flexible, full, strict
                                • notes: Depends on the zone's plan level
                                cURL (example)
                                curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/ssl" \
                                     -H "X-Auth-Email: [email protected]" \
                                     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                     -H "Content-Type: application/json" \
                                     --data '{"value":"off"}'
                                Response (example)
                                {
                                  "success": true,
                                  "errors": [],
                                  "messages": [],
                                  "result": {
                                    "id": "ssl",
                                    "value": "off",
                                    "editable": true,
                                    "modified_on": "2014-01-01T05:20:00.12345Z"
                                  }
                                }
                                zone-settings-change-tls-client-auth-setting

                                PATCH Change TLS Client Auth setting permission needed: #zone_settings:edit
                                • free
                                • pro
                                • business
                                • enterprise

                                TLS Client Auth requires Cloudflare to connect to your origin server using a client certificate (Enterprise Only)

                                PATCH zones/:zone_identifier/settings/tls_client_auth

                                Required parameters

                                Name /typeDescription /exampleConstraints
                                value

                                TLS Client Auth requires Cloudflare to connect to your origin server using a client certificate (Enterprise Only)

                                { "id": "tls_client_auth", "value": "on", "editable": true, "modified_on": "2014-01-01T05:20:00.12345Z" }
                                An object with the following properties:
                                  cURL (example)
                                  curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/tls_client_auth" \
                                       -H "X-Auth-Email: [email protected]" \
                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                       -H "Content-Type: application/json" \
                                       --data '{"value":{"id":"tls_client_auth","value":"on","editable":true,"modified_on":"2014-01-01T05:20:00.12345Z"}}'
                                  Response (example)
                                  {
                                    "success": true,
                                    "errors": [],
                                    "messages": [],
                                    "result": {
                                      "id": "tls_client_auth",
                                      "value": "on",
                                      "editable": true,
                                      "modified_on": "2014-01-01T05:20:00.12345Z"
                                    }
                                  }
                                  zone-settings-change-true-client-ip-setting

                                  PATCH Change True Client IP setting permission needed: #zone_settings:edit
                                  • free
                                  • pro
                                  • business
                                  • enterprise

                                  Allows customer to continue to use True Client IP (Akamai feature) in the headers we send to the origin. This is limited to Enterprise Zones.

                                  PATCH zones/:zone_identifier/settings/true_client_ip_header

                                  Required parameters

                                  Name /typeDescription /exampleConstraints
                                  value

                                  Value of the zone setting

                                  "off"
                                  • default value: off
                                  • valid values: on, off
                                  cURL (example)
                                  curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/true_client_ip_header" \
                                       -H "X-Auth-Email: [email protected]" \
                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                       -H "Content-Type: application/json" \
                                       --data '{"value":"off"}'
                                  Response (example)
                                  {
                                    "success": true,
                                    "errors": [],
                                    "messages": [],
                                    "result": "off"
                                  }
                                  zone-settings-change-tls-1.2-setting

                                  PATCH Change TLS 1.2 setting permission needed: #zone_settings:edit
                                  • free
                                  • pro
                                  • business
                                  • enterprise

                                  Enable Crypto TLS 1.2 feature for this zone and prevent use of previous versions. This is limited to Enterprise or Business Zones.

                                  PATCH zones/:zone_identifier/settings/tls_1_2_only

                                  Required parameters

                                  Name /typeDescription /exampleConstraints
                                  value

                                  Value of the zone setting

                                  "off"
                                  • default value: off
                                  • valid values: on, off
                                  cURL (example)
                                  curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/tls_1_2_only" \
                                       -H "X-Auth-Email: [email protected]" \
                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                       -H "Content-Type: application/json" \
                                       --data '{"value":"off"}'
                                  Response (example)
                                  {
                                    "success": true,
                                    "errors": [],
                                    "messages": [],
                                    "result": "off"
                                  }
                                  zone-settings-change-tls-1.3-setting

                                  PATCH Change TLS 1.3 setting permission needed: #zone_settings:edit
                                  • free
                                  • pro
                                  • business
                                  • enterprise

                                  Enable Crypto TLS 1.3 feature for this zone.

                                  PATCH zones/:zone_identifier/settings/tls_1_3

                                  Required parameters

                                  Name /typeDescription /exampleConstraints
                                  value

                                  Value of the zone setting

                                  "off"
                                  • default value: off
                                  • valid values: on, off
                                  • notes: Default value depends on the zone's plan level.
                                  cURL (example)
                                  curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/tls_1_3" \
                                       -H "X-Auth-Email: [email protected]" \
                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                       -H "Content-Type: application/json" \
                                       --data '{"value":"off"}'
                                  Response (example)
                                  {
                                    "success": true,
                                    "errors": [],
                                    "messages": [],
                                    "result": "off"
                                  }
                                  zone-settings-change-web-application-firewall-waf-setting

                                  PATCH Change Web Application Firewall (WAF) setting permission needed: #zone_settings:edit
                                  • free
                                  • pro
                                  • business
                                  • enterprise

                                  The WAF examines HTTP requests to your website. It inspects both GET and POST requests and applies rules to help filter out illegitimate traffic from legitimate website visitors. The Cloudflare WAF inspects website addresses or URLs to detect anything out of the ordinary. If the Cloudflare WAF determines suspicious user behavior, then the WAF will ‘challenge’ the web visitor with a page that asks them to submit a CAPTCHA successfully to continue their action. If the challenge is failed, the action will be stopped. What this means is that Cloudflare’s WAF will block any traffic identified as illegitimate before it reaches your origin web server. (https://support.cloudflare.com/hc/en-us/articles/200172016)

                                  PATCH zones/:zone_identifier/settings/waf

                                  Required parameters

                                  Name /typeDescription /exampleConstraints
                                  value

                                  Value of the zone setting

                                  "off"
                                  • default value: off
                                  • valid values: on, off
                                  cURL (example)
                                  curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/waf" \
                                       -H "X-Auth-Email: [email protected]" \
                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                       -H "Content-Type: application/json" \
                                       --data '{"value":"off"}'
                                  Response (example)
                                  {
                                    "success": true,
                                    "errors": [],
                                    "messages": [],
                                    "result": {
                                      "id": "waf",
                                      "value": "off",
                                      "editable": true,
                                      "modified_on": "2014-01-01T05:20:00.12345Z"
                                    }
                                  }
                                  zone-settings-change-http2-setting

                                  PATCH Change HTTP2 setting permission needed: #zone_settings:edit
                                  • free
                                  • pro
                                  • business
                                  • enterprise

                                  Value of the HTTP2 setting

                                  PATCH zones/:zone_identifier/settings/http2

                                  Required parameters

                                  Name /typeDescription /exampleConstraints
                                  value

                                  Value of the HTTP2 setting

                                  "off"
                                  • default value: off
                                  • valid values: on, off
                                  cURL (example)
                                  curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/http2" \
                                       -H "X-Auth-Email: [email protected]" \
                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                       -H "Content-Type: application/json" \
                                       --data '{"value":"off"}'
                                  Response (example)
                                  {
                                    "success": true,
                                    "errors": [],
                                    "messages": [],
                                    "result": {
                                      "id": "http2",
                                      "value": "off",
                                      "editable": true,
                                      "modified_on": "2014-01-01T05:20:00.12345Z"
                                    }
                                  }
                                  zone-settings-change-pseudo-ipv4-setting

                                  PATCH Change Pseudo IPv4 setting permission needed: #zone_settings:edit
                                  • free
                                  • pro
                                  • business
                                  • enterprise

                                  Value of the Pseudo IPv4 setting

                                  PATCH zones/:zone_identifier/settings/pseudo_ipv4

                                  Required parameters

                                  Name /typeDescription /exampleConstraints
                                  value

                                  Value of the Pseudo IPv4 setting

                                  "off"
                                  • default value: off
                                  • valid values: off, add_header, overwrite_header
                                  cURL (example)
                                  curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/pseudo_ipv4" \
                                       -H "X-Auth-Email: [email protected]" \
                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                       -H "Content-Type: application/json" \
                                       --data '{"value":"off"}'
                                  Response (example)
                                  {
                                    "success": true,
                                    "errors": [],
                                    "messages": [],
                                    "result": {
                                      "id": "pseudo_ipv4",
                                      "value": "off",
                                      "editable": true,
                                      "modified_on": "2014-01-01T05:20:00.12345Z"
                                    }
                                  }
                                  zone-settings-change-websockets-setting

                                  PATCH Change WebSockets setting permission needed: #zone_settings:edit
                                  • free
                                  • pro
                                  • business
                                  • enterprise

                                  WebSockets are open connections sustained between the client and the origin server. Inside a WebSockets connection, the client and the origin can pass data back and forth without having to reestablish sessions. This makes exchanging data within a WebSockets connection fast. WebSockets are often used for real-time applications such as live chat and gaming. (https://support.cloudflare.com/hc/en-us/articles/200169466-Can-I-use-Cloudflare-with-WebSockets-)

                                  PATCH zones/:zone_identifier/settings/websockets

                                  Required parameters

                                  Name /typeDescription /exampleConstraints
                                  value

                                  Value of the zone setting

                                  "off"
                                  • default value: off
                                  • valid values: off, on
                                  cURL (example)
                                  curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/websockets" \
                                       -H "X-Auth-Email: [email protected]" \
                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                       -H "Content-Type: application/json" \
                                       --data '{"value":"off"}'
                                  Response (example)
                                  {
                                    "success": true,
                                    "errors": [],
                                    "messages": [],
                                    "result": {
                                      "id": "websockets",
                                      "value": "off",
                                      "editable": true,
                                      "modified_on": "2014-01-01T05:20:00.12345Z"
                                    }
                                  }

                                  DNS Records for a Zone

                                  Documentation for Cloudflare DNS records

                                  dns-records-for-a-zone

                                  Object definitions

                                  View properties and constraints defined on the object

                                  Show definitions

                                  dns-records-for-a-zone-create-dns-record

                                  POST Create DNS record permission needed: #dns_records:edit
                                  • free
                                  • pro
                                  • business
                                  • enterprise

                                  Create a new DNS record for a zone. See the record object definitions for required attributes for each record type

                                  POST zones/:zone_identifier/dns_records

                                  Required parameters

                                  Name /typeDescription /exampleConstraints
                                  type

                                  DNS record type

                                  "A"
                                  • valid values: A, AAAA, CNAME, TXT, SRV, LOC, MX, NS, SPF
                                  • read only
                                  name
                                  string

                                  DNS record name

                                  "example.com"
                                  • max length: 255
                                  content
                                  string

                                  DNS record content

                                  "127.0.0.1"

                                    Optional parameters

                                    Name /typeDescription /exampleConstraints
                                    ttl
                                    number

                                    Time to live for DNS record. Value of 1 is 'automatic'

                                    120
                                    • min value:120
                                    • max value:2147483647
                                    priority
                                    number

                                    Used with some records like MX and SRV to determine priority. If you do not supply a priority for an MX record, a default value of 0 will be set

                                    10
                                    • min value:0
                                    • max value:65535
                                    proxied
                                    boolean

                                    Whether the record is receiving the performance and security benefits of Cloudflare

                                    false
                                    • valid values: (true,false)
                                    cURL (example)
                                    curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records" \
                                         -H "X-Auth-Email: [email protected]" \
                                         -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                         -H "Content-Type: application/json" \
                                         --data '{"type":"A","name":"example.com","content":"127.0.0.1","ttl":120,"priority":10,"proxied":false}'
                                    Response (example)
                                    {
                                      "success": true,
                                      "errors": [],
                                      "messages": [],
                                      "result": {
                                        "id": "372e67954025e0ba6aaa6d586b9e0b59",
                                        "type": "A",
                                        "name": "example.com",
                                        "content": "1.2.3.4",
                                        "proxiable": true,
                                        "proxied": false,
                                        "ttl": 120,
                                        "locked": false,
                                        "zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
                                        "zone_name": "example.com",
                                        "created_on": "2014-01-01T05:20:00.12345Z",
                                        "modified_on": "2014-01-01T05:20:00.12345Z",
                                        "data": {}
                                      }
                                    }
                                    dns-records-for-a-zone-list-dns-records

                                    GET List DNS Records permission needed: #dns_records:read
                                    • free
                                    • pro
                                    • business
                                    • enterprise

                                    List, search, sort, and filter a zones' DNS records.

                                    GET zones/:zone_identifier/dns_records

                                    Optional parameters

                                    Name /typeDescription /exampleConstraints
                                    type

                                    DNS record type

                                    "A"
                                    • valid values: A, AAAA, CNAME, TXT, SRV, LOC, MX, NS, SPF
                                    • read only
                                    name
                                    string

                                    DNS record name

                                    "example.com"
                                    • max length: 255
                                    content
                                    string

                                    DNS record content

                                    "127.0.0.1"
                                      page
                                      number

                                      Page number of paginated results

                                      1
                                      • default value: 1
                                      • min value:1
                                      per_page
                                      number

                                      Number of DNS records per page

                                      20
                                      • default value: 20
                                      • min value:5
                                      • max value:100
                                      order

                                      Field to order records by

                                      "type"
                                      • valid values: type, name, content, ttl, proxied
                                      direction

                                      Direction to order domains

                                      "desc"
                                      • valid values: asc, desc
                                      match

                                      Whether to match all search requirements or at least one (any)

                                      "all"
                                      • default value: all
                                      • valid values: any, all
                                      cURL (example)
                                      curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records?type=A&name=example.com&content=127.0.0.1&page=1&per_page=20&order=type&direction=desc&match=all" \
                                           -H "X-Auth-Email: [email protected]" \
                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                           -H "Content-Type: application/json"
                                      Response (example)
                                      {
                                        "success": true,
                                        "errors": [],
                                        "messages": [],
                                        "result": [
                                          {
                                            "id": "372e67954025e0ba6aaa6d586b9e0b59",
                                            "type": "A",
                                            "name": "example.com",
                                            "content": "1.2.3.4",
                                            "proxiable": true,
                                            "proxied": false,
                                            "ttl": 120,
                                            "locked": false,
                                            "zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
                                            "zone_name": "example.com",
                                            "created_on": "2014-01-01T05:20:00.12345Z",
                                            "modified_on": "2014-01-01T05:20:00.12345Z",
                                            "data": {}
                                          }
                                        ],
                                        "result_info": {
                                          "page": 1,
                                          "per_page": 20,
                                          "count": 1,
                                          "total_count": 2000
                                        }
                                      }
                                      dns-records-for-a-zone-dns-record-details

                                      GET DNS record details permission needed: #dns_records:read
                                      • free
                                      • pro
                                      • business
                                      • enterprise

                                      GET zones/:zone_identifier/dns_records/:identifier
                                      cURL (example)
                                      curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records/372e67954025e0ba6aaa6d586b9e0b59" \
                                           -H "X-Auth-Email: [email protected]" \
                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                           -H "Content-Type: application/json"
                                      Response (example)
                                      {
                                        "success": true,
                                        "errors": [],
                                        "messages": [],
                                        "result": {
                                          "id": "372e67954025e0ba6aaa6d586b9e0b59",
                                          "type": "A",
                                          "name": "example.com",
                                          "content": "1.2.3.4",
                                          "proxiable": true,
                                          "proxied": false,
                                          "ttl": 120,
                                          "locked": false,
                                          "zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
                                          "zone_name": "example.com",
                                          "created_on": "2014-01-01T05:20:00.12345Z",
                                          "modified_on": "2014-01-01T05:20:00.12345Z",
                                          "data": {}
                                        }
                                      }
                                      dns-records-for-a-zone-update-dns-record

                                      PUT Update DNS record permission needed: #dns_records:edit
                                      • free
                                      • pro
                                      • business
                                      • enterprise

                                      PUT zones/:zone_identifier/dns_records/:identifier

                                      Required parameters

                                      Name /typeDescription /exampleConstraints
                                      type

                                      DNS record type

                                      "A"
                                      • valid values: A, AAAA, CNAME, TXT, SRV, LOC, MX, NS, SPF
                                      • read only
                                      name
                                      string

                                      DNS record name

                                      "example.com"
                                      • max length: 255
                                      content
                                      string

                                      DNS record content

                                      "127.0.0.1"

                                        Optional parameters

                                        Name /typeDescription /exampleConstraints
                                        ttl
                                        number

                                        Time to live for DNS record. Value of 1 is 'automatic'

                                        120
                                        • min value:120
                                        • max value:2147483647
                                        proxied
                                        boolean

                                        Whether the record is receiving the performance and security benefits of Cloudflare

                                        false
                                        • valid values: (true,false)
                                        cURL (example)
                                        curl -X PUT "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records/372e67954025e0ba6aaa6d586b9e0b59" \
                                             -H "X-Auth-Email: [email protected]" \
                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                             -H "Content-Type: application/json" \
                                             --data '{"type":"A","name":"example.com","content":"127.0.0.1","ttl":120,"proxied":false}'
                                        Response (example)
                                        {
                                          "success": true,
                                          "errors": [],
                                          "messages": [],
                                          "result": {
                                            "id": "372e67954025e0ba6aaa6d586b9e0b59",
                                            "type": "A",
                                            "name": "example.com",
                                            "content": "1.2.3.4",
                                            "proxiable": true,
                                            "proxied": false,
                                            "ttl": 120,
                                            "locked": false,
                                            "zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
                                            "zone_name": "example.com",
                                            "created_on": "2014-01-01T05:20:00.12345Z",
                                            "modified_on": "2014-01-01T05:20:00.12345Z",
                                            "data": {}
                                          }
                                        }
                                        dns-records-for-a-zone-delete-dns-record

                                        DELETE Delete DNS record permission needed: #dns_records:edit
                                        • free
                                        • pro
                                        • business
                                        • enterprise

                                        DELETE zones/:zone_identifier/dns_records/:identifier
                                        cURL (example)
                                        curl -X DELETE "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records/372e67954025e0ba6aaa6d586b9e0b59" \
                                             -H "X-Auth-Email: [email protected]" \
                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                             -H "Content-Type: application/json"
                                        Response (example)
                                        {
                                          "success": true,
                                          "errors": [],
                                          "messages": [],
                                          "result": {
                                            "id": "372e67954025e0ba6aaa6d586b9e0b59"
                                          }
                                        }
                                        dns-records-for-a-zone-import-dns-records

                                        POST Import DNS records permission needed: #dns_records:edit
                                        • free
                                        • pro
                                        • business
                                        • enterprise

                                        You can upload your BIND config through this endpoint. It assumes that cURL is called from a location with bind_config.txt (valid BIND config) present.

                                        POST zones/:zone_identifier/dns_records/import

                                        Required parameters

                                        Name /typeDescription /exampleConstraints
                                        file
                                        string

                                        BIND config to upload

                                        "@bind_config.txt"

                                          Optional parameters

                                          Name /typeDescription /exampleConstraints
                                          proxied
                                          boolean

                                          Whether or not proxiable records should receive the performance and security benefits of Cloudflare

                                          false
                                          • valid values: (true,false)
                                          cURL (example)
                                          curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/dns_records/import" \
                                               -H "X-Auth-Email: [email protected]" \
                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                               --form "[email protected]_config.txt;proxied=false"
                                          Response (example)
                                          {
                                            "success": true,
                                            "errors": [],
                                            "messages": [],
                                            "result": {
                                              "recs_added": 5,
                                              "total_records_parsed": 5
                                            },
                                            "timing": {
                                              "start_time": "2014-03-01T12:20:00Z",
                                              "end_time": "2014-03-01T12:20:01Z",
                                              "process_time": 1
                                            }
                                          }

                                          DNS Records for a Zone error codes

                                          CodeDescription
                                          1012Zone file for '<domain name>' is not modifiable
                                          1034Invalid port value. Must be between 0 and 65,535
                                          1045The record could not be found
                                          1056Invalid or missing lat_direction. Values must be N or S
                                          1067Invalid content for a NS record
                                          1002Invalid or missing zone_id
                                          1013The record could not be found
                                          1024Invalid priority, priority must be set and be between 0 and 65535
                                          1046A record with these exact values already exists. Please modify or cancel this edit
                                          1057Invalid long_degrees, must be an integer between 0 and 180
                                          1068Target cannot be an IP address
                                          1003per_page must be a positive integer
                                          1014You do not have permission to modify this zone
                                          1025Invalid content for an MX record
                                          1047You do not have permission to modify this zone
                                          1058Invalid long_minutes, must be an integer between 0 and 59
                                          1069CNAME content cannot reference itself
                                          1004Invalid or missing zone
                                          1015Unknown error
                                          1026Invalid format for a SPF record. A valid example is 'v=spf1 a mx -all'. You should not include either the word TXT or the domain name here in the content
                                          1037Invalid domain name for a SRV target host
                                          1048You have reached the record limit for this zone
                                          1059Invalid long_seconds, must be a floating point number between 0 and 60, including 0 but not including 60
                                          1005Invalid or missing record
                                          1027Invalid service value
                                          1038Invalid DNS record type
                                          1049The record content is missing
                                          1017Content for A record is invalid. Must be a valid IPv4 address
                                          1028Invalid service value. Must be less than 100 characters
                                          1039Invalid TTL. Must be between 120 and 4,294,967,295 seconds, or 1 for automatic
                                          1007name required
                                          1018Content for AAAA record is invalid. Must be a valid IPv6 address
                                          1029Invalid protocol value
                                          1008content required
                                          1019Content for CNAME record is invalid
                                          1009Invalid or missing record id
                                          1070CNAME content cannot be an IP
                                          1060Invalid or missing long_direction. Values must be E or S
                                          1071Invalid proxied mode. Record cannot be proxied
                                          1050Could not find record
                                          1061Invalid altitude, must be a floating point number between -100000.00 and 42849672.95
                                          1072Invalid record identifier
                                          1062Invalid size, must be a floating point number between 0 and 90000000.00
                                          1073Invalid TXT record. Must be less than 255 characters
                                          1030Invalid protocol value. Must be less than 12 characters
                                          1041Priority must be set for SRV record
                                          1052You can not point a CNAME to itself
                                          1063Invalid precision_horz, must be a floating point number between 0 and 90000000.00
                                          1074Invalid TXT record. Record may only contain printable ASCII!
                                          1031Invalid SRV name
                                          1042Zone file for '<domain name>' could not be found
                                          1053Invalid lat_degrees, must be an integer between 0 and 90 inclusive
                                          1064Invalid precision_vert, must be a floating point number between 0 and 90000000.00
                                          1010Invalid or missing record
                                          1032Invalid SRV name. Must be less than 90 characters
                                          1043Zone file for '<domain name>' is not editable
                                          1054Invalid lat_minutes, must be an integer between 0 and 59 inclusive
                                          1065Invalid or missing data for <type> record
                                          1000Invalid user
                                          1011Zone file for '<domain name>' could not be found
                                          1033Invalid weight value. Must be between 0 and 65,535
                                          1044A record with these exact values already exists. Please modify or remove this record
                                          1055Invalid lat_seconds, must be a floating point number between 0 and 60, including 0 but not including 60

                                          DNS Records for a Zone Notes

                                          If a zone's cname_setup_status is TRUE, you may only add A/AAAA and CNAME records for that zone
                                          When adding a CNAME record, it will not be added if there is an A or AAAA record with the same name
                                          When adding a A or AAAA record, it will not be added if there is an CNAME record with the same name
                                          A CNAME record's name may not match it's content
                                          You cannot add an NS record with the same name as any other record type
                                          You cannot add a record with the same name as any NS record
                                          Cloudflare will not begin serving DNS for a zone until the zone's nameservers are switched to Cloudflare nameservers at the zone's registrar
                                          DNS will continue to be served by Cloudflare for 20 days after a zone's nameservers are switched away from Cloudflare namservers
                                          When using unicode characters in domain names, they will be translated to punycode and as such, the length may end up being larger than what is passed into the API

                                          Railgun connections for a Zone

                                          Railguns associated with a zone

                                          railgun-connections-for-a-zone

                                          Object definition

                                          View properties and constraints defined on the object

                                          Show definition

                                          railgun-connections-for-a-zone-get-available-railguns

                                          GET Get available Railguns permission needed: #zone_settings:read
                                          • free
                                          • pro
                                          • business
                                          • enterprise

                                          A list of available Railguns the zone can use

                                          GET zones/:zone_identifier/railguns
                                          cURL (example)
                                          curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/railguns" \
                                               -H "X-Auth-Email: [email protected]" \
                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                               -H "Content-Type: application/json"
                                          Response (example)
                                          {
                                            "success": true,
                                            "errors": [],
                                            "messages": [],
                                            "result": [
                                              {
                                                "id": "e928d310693a83094309acf9ead50448",
                                                "name": "My Railgun",
                                                "enabled": true,
                                                "connected": true
                                              }
                                            ],
                                            "result_info": {
                                              "page": 1,
                                              "per_page": 20,
                                              "count": 1,
                                              "total_count": 2000
                                            }
                                          }
                                          railgun-connections-for-a-zone-get-railgun-details

                                          GET Get Railgun details permission needed: #zone_settings:read
                                          • free
                                          • pro
                                          • business
                                          • enterprise

                                          Details about a specific Railgun

                                          GET zones/:zone_identifier/railguns/:identifier
                                          cURL (example)
                                          curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/railguns/e928d310693a83094309acf9ead50448" \
                                               -H "X-Auth-Email: [email protected]" \
                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                               -H "Content-Type: application/json"
                                          Response (example)
                                          {
                                            "success": true,
                                            "errors": [],
                                            "messages": [],
                                            "result": {
                                              "id": "e928d310693a83094309acf9ead50448",
                                              "name": "My Railgun",
                                              "enabled": true,
                                              "connected": true
                                            }
                                          }
                                          railgun-connections-for-a-zone-test-railgun-connection

                                          GET Test Railgun connection permission needed: #zone_settings:read
                                          • free
                                          • pro
                                          • business
                                          • enterprise

                                          Test Railgun connection to the Zone

                                          GET zones/:zone_identifier/railguns/:identifier/diagnose
                                          cURL (example)
                                          curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/railguns/e928d310693a83094309acf9ead50448/diagnose" \
                                               -H "X-Auth-Email: [email protected]" \
                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                               -H "Content-Type: application/json"
                                          Response (example)
                                          {
                                            "success": true,
                                            "errors": [],
                                            "messages": [],
                                            "result": {
                                              "method": "GET",
                                              "host_name": "www.example.com",
                                              "http_status": 200,
                                              "railgun": "on",
                                              "url": "https://www.cloudflare.com",
                                              "response_status": "200 OK",
                                              "protocol": "HTTP/1.1",
                                              "elapsed_time": "0.239013s",
                                              "body_size": "63910 bytes",
                                              "body_hash": "be27f2429421e12f200cab1da43ba301bdc70e1d",
                                              "missing_headers": "No Content-Length or Transfer-Encoding",
                                              "connection_close": false,
                                              "cloudflare": "on",
                                              "cf-ray": "1ddd7570575207d9-LAX",
                                              "cf-wan-error": null,
                                              "cf-cache-status": null
                                            }
                                          }
                                          railgun-connections-for-a-zone-connect-or-disconnect-a-railgun

                                          PATCH Connect or disconnect a Railgun permission needed: #zone_settings:edit
                                          • free
                                          • pro
                                          • business
                                          • enterprise

                                          Connect or disconnect a Railgun

                                          PATCH zones/:zone_identifier/railguns/:identifier

                                          Required parameters

                                          Name /typeDescription /exampleConstraints
                                          connected
                                          boolean

                                          A flag indicating whether the given zone is connected to the Railgun

                                          true
                                          • default value: false
                                          • valid values: (true,false)
                                          cURL (example)
                                          curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/railguns/e928d310693a83094309acf9ead50448" \
                                               -H "X-Auth-Email: [email protected]" \
                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                               -H "Content-Type: application/json" \
                                               --data '{"connected":true}'
                                          Response (example)
                                          {
                                            "success": true,
                                            "errors": [],
                                            "messages": [],
                                            "result": {
                                              "id": "e928d310693a83094309acf9ead50448",
                                              "name": "My Railgun",
                                              "enabled": true,
                                              "connected": true
                                            }
                                          }

                                          Zone Analytics

                                          Analytics data for a zone

                                          zone-analytics

                                          Object definitions

                                          View properties and constraints defined on the object

                                          Show definitions

                                          zone-analytics-dashboard

                                          GET Dashboard permission needed: #analytics:read
                                          • free
                                          • pro
                                          • business
                                          • enterprise

                                          The dashboard view provides both totals and timeseries data for the given zone and time period across the entire Cloudflare network.

                                          GET zones/:zone_identifier/analytics/dashboard

                                          Optional parameters

                                          Name /typeDescription /exampleConstraints
                                          since
                                          stringinteger

                                          The (inclusive) beginning of the requested time frame. This value can be a negative integer representing the number of minutes in the past relative to time the request is made, or can be an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than one year.

                                          Ranges that the Cloudflare web application provides will provide the following period length for each point:

                                          • Last 60 minutes (from -59 to -1): 1 minute resolution
                                          • Last 7 hours (from -419 to -60): 15 minutes resolution
                                          • Last 15 hours (from -899 to -420): 30 minutes resolution
                                          • Last 72 hours (from -4320 to -900): 1 hour resolution
                                          • Older than 3 days (-525600 to -4320): 1 day resolution
                                          "2015-01-01T12:23:00Z"
                                          • default value: -10080
                                          until
                                          stringinteger

                                          The (exclusive) end of the requested time frame. This value can be a negative integer representing the number of minutes in the past relative to time the request is made, or can be an absolute timestamp that conforms to RFC 3339. If omitted, the time of the request is used.

                                          "2015-01-02T12:23:00Z"
                                          • default value: 0
                                          continuous
                                          boolean

                                          When set to true, and when since is a relative timestamp (i.e. a negative number, representing the number of seconds to look back), the API will move the requested time window backward, up to a bounded number of seconds, until it finds a complete, continuous region of data. This flag thus should only be true when trying to get the most recently arrived, but also completely aggregated, data.

                                          The API will also return data when continuous is true and when until is set, or when both since and until are absolute timestamps. However, due to the underlying behaviour of continuous=true, which regresses the time window if data is not available, the users must beware that with these parameters, the API response may not represent the requested time window. We thus advise against using both continuous=true and absolute timestamps.

                                          true
                                          • default value: true
                                          • valid values: (true,false)
                                          cURL (example)
                                          curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/analytics/dashboard?since=2015-01-01T12:23:00Z&until=2015-01-02T12:23:00Z&continuous=true" \
                                               -H "X-Auth-Email: [email protected]" \
                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                               -H "Content-Type: application/json"
                                          Response (example)
                                          {
                                            "success": true,
                                            "errors": [],
                                            "messages": [],
                                            "result": {
                                              "totals": {
                                                "since": "2015-01-01T12:23:00Z",
                                                "until": "2015-01-02T12:23:00Z",
                                                "requests": {
                                                  "all": 1234085328,
                                                  "cached": 1234085328,
                                                  "uncached": 13876154,
                                                  "content_type": {
                                                    "css": 15343,
                                                    "html": 1234213,
                                                    "javascript": 318236,
                                                    "gif": 23178,
                                                    "jpeg": 1982048
                                                  },
                                                  "country": {
                                                    "US": 4181364,
                                                    "AG": 37298,
                                                    "GI": 293846
                                                  },
                                                  "ssl": {
                                                    "encrypted": 12978361,
                                                    "unencrypted": 781263
                                                  },
                                                  "http_status": {
                                                    "200": 13496983,
                                                    "301": 283,
                                                    "400": 187936,
                                                    "402": 1828,
                                                    "404": 1293
                                                  }
                                                },
                                                "bandwidth": {
                                                  "all": 213867451,
                                                  "cached": 113205063,
                                                  "uncached": 113205063,
                                                  "content_type": {
                                                    "css": 237421,
                                                    "html": 1231290,
                                                    "javascript": 123245,
                                                    "gif": 1234242,
                                                    "jpeg": 784278
                                                  },
                                                  "country": {
                                                    "US": 123145433,
                                                    "AG": 2342483,
                                                    "GI": 984753
                                                  },
                                                  "ssl": {
                                                    "encrypted": 37592942,
                                                    "unencrypted": 237654192
                                                  }
                                                },
                                                "threats": {
                                                  "all": 23423873,
                                                  "country": {
                                                    "US": 123,
                                                    "CN": 523423,
                                                    "AU": 91
                                                  },
                                                  "type": {
                                                    "user.ban.ip": 123,
                                                    "hot.ban.unknown": 5324,
                                                    "macro.chl.captchaErr": 1341,
                                                    "macro.chl.jschlErr": 5323
                                                  }
                                                },
                                                "pageviews": {
                                                  "all": 5724723,
                                                  "search_engine": {
                                                    "googlebot": 35272,
                                                    "pingdom": 13435,
                                                    "bingbot": 5372,
                                                    "baidubot": 1345
                                                  }
                                                },
                                                "uniques": {
                                                  "all": 12343
                                                }
                                              },
                                              "timeseries": [
                                                {
                                                  "since": "2015-01-01T12:23:00Z",
                                                  "until": "2015-01-02T12:23:00Z",
                                                  "requests": {
                                                    "all": 1234085328,
                                                    "cached": 1234085328,
                                                    "uncached": 13876154,
                                                    "content_type": {
                                                      "css": 15343,
                                                      "html": 1234213,
                                                      "javascript": 318236,
                                                      "gif": 23178,
                                                      "jpeg": 1982048
                                                    },
                                                    "country": {
                                                      "US": 4181364,
                                                      "AG": 37298,
                                                      "GI": 293846
                                                    },
                                                    "ssl": {
                                                      "encrypted": 12978361,
                                                      "unencrypted": 781263
                                                    },
                                                    "http_status": {
                                                      "200": 13496983,
                                                      "301": 283,
                                                      "400": 187936,
                                                      "402": 1828,
                                                      "404": 1293
                                                    }
                                                  },
                                                  "bandwidth": {
                                                    "all": 213867451,
                                                    "cached": 113205063,
                                                    "uncached": 113205063,
                                                    "content_type": {
                                                      "css": 237421,
                                                      "html": 1231290,
                                                      "javascript": 123245,
                                                      "gif": 1234242,
                                                      "jpeg": 784278
                                                    },
                                                    "country": {
                                                      "US": 123145433,
                                                      "AG": 2342483,
                                                      "GI": 984753
                                                    },
                                                    "ssl": {
                                                      "encrypted": 37592942,
                                                      "unencrypted": 237654192
                                                    }
                                                  },
                                                  "threats": {
                                                    "all": 23423873,
                                                    "country": {
                                                      "US": 123,
                                                      "CN": 523423,
                                                      "AU": 91
                                                    },
                                                    "type": {
                                                      "user.ban.ip": 123,
                                                      "hot.ban.unknown": 5324,
                                                      "macro.chl.captchaErr": 1341,
                                                      "macro.chl.jschlErr": 5323
                                                    }
                                                  },
                                                  "pageviews": {
                                                    "all": 5724723,
                                                    "search_engine": {
                                                      "googlebot": 35272,
                                                      "pingdom": 13435,
                                                      "bingbot": 5372,
                                                      "baidubot": 1345
                                                    }
                                                  },
                                                  "uniques": {
                                                    "all": 12343
                                                  }
                                                }
                                              ]
                                            },
                                            "query": {
                                              "since": "2015-01-01T12:23:00Z",
                                              "until": "2015-01-02T12:23:00Z",
                                              "time_delta": 60
                                            }
                                          }
                                          zone-analytics-analytics-by-co-locations

                                          GET Analytics by Co-locations permission needed: #analytics:read
                                          • free
                                          • pro
                                          • business
                                          • enterprise

                                          This view provides a breakdown of analytics data by datacenter. Note: This is available to Enterprise customers only.

                                          GET zones/:zone_identifier/analytics/colos

                                          Optional parameters

                                          Name /typeDescription /exampleConstraints
                                          since
                                          stringinteger

                                          The (inclusive) beginning of the requested time frame. This value can be a negative integer representing the number of minutes in the past relative to time the request is made, or can be an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than one year.

                                          Ranges that the Cloudflare web application provides will provide the following period length for each point:

                                          • Last 60 minutes (from -59 to -1): 1 minute resolution
                                          • Last 7 hours (from -419 to -60): 15 minutes resolution
                                          • Last 15 hours (from -899 to -420): 30 minutes resolution
                                          • Last 72 hours (from -4320 to -900): 1 hour resolution
                                          • Older than 3 days (-525600 to -4320): 1 day resolution
                                          "2015-01-01T12:23:00Z"
                                          • default value: -10080
                                          until
                                          stringinteger

                                          The (exclusive) end of the requested time frame. This value can be a negative integer representing the number of minutes in the past relative to time the request is made, or can be an absolute timestamp that conforms to RFC 3339. If omitted, the time of the request is used.

                                          "2015-01-02T12:23:00Z"
                                          • default value: 0
                                          continuous
                                          boolean

                                          When set to true, and when since is a relative timestamp (i.e. a negative number, representing the number of seconds to look back), the API will move the requested time window backward, up to a bounded number of seconds, until it finds a complete, continuous region of data. This flag thus should only be true when trying to get the most recently arrived, but also completely aggregated, data.

                                          The API will also return data when continuous is true and when until is set, or when both since and until are absolute timestamps. However, due to the underlying behaviour of continuous=true, which regresses the time window if data is not available, the users must beware that with these parameters, the API response may not represent the requested time window. We thus advise against using both continuous=true and absolute timestamps.

                                          true
                                          • default value: true
                                          • valid values: (true,false)
                                          cURL (example)
                                          curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/analytics/colos?since=2015-01-01T12:23:00Z&until=2015-01-02T12:23:00Z&continuous=true" \
                                               -H "X-Auth-Email: [email protected]" \
                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                               -H "Content-Type: application/json"
                                          Response (example)
                                          {
                                            "success": true,
                                            "errors": [],
                                            "messages": [],
                                            "result": [
                                              {
                                                "colo_id": "SFO",
                                                "timeseries": [
                                                  {
                                                    "since": "2015-01-01T12:23:00Z",
                                                    "until": "2015-01-02T12:23:00Z",
                                                    "requests": {
                                                      "all": 1234085328,
                                                      "cached": 1234085328,
                                                      "uncached": 13876154,
                                                      "country": {
                                                        "US": 4181364,
                                                        "AG": 37298,
                                                        "GI": 293846
                                                      },
                                                      "http_status": {
                                                        "200": 13496983,
                                                        "301": 283,
                                                        "400": 187936,
                                                        "402": 1828,
                                                        "404": 1293
                                                      }
                                                    },
                                                    "bandwidth": {
                                                      "all": 213867451,
                                                      "cached": 113205063,
                                                      "uncached": 113205063
                                                    },
                                                    "threats": {
                                                      "all": 23423873,
                                                      "country": {
                                                        "US": 123,
                                                        "CN": 523423,
                                                        "AU": 91
                                                      },
                                                      "type": {
                                                        "user.ban.ip": 123,
                                                        "hot.ban.unknown": 5324,
                                                        "macro.chl.captchaErr": 1341,
                                                        "macro.chl.jschlErr": 5323
                                                      }
                                                    }
                                                  }
                                                ],
                                                "totals": {
                                                  "since": "2015-01-01T12:23:00Z",
                                                  "until": "2015-01-02T12:23:00Z",
                                                  "requests": {
                                                    "all": 1234085328,
                                                    "cached": 1234085328,
                                                    "uncached": 13876154,
                                                    "country": {
                                                      "US": 4181364,
                                                      "AG": 37298,
                                                      "GI": 293846
                                                    },
                                                    "http_status": {
                                                      "200": 13496983,
                                                      "301": 283,
                                                      "400": 187936,
                                                      "402": 1828,
                                                      "404": 1293
                                                    }
                                                  },
                                                  "bandwidth": {
                                                    "all": 213867451,
                                                    "cached": 113205063,
                                                    "uncached": 113205063
                                                  },
                                                  "threats": {
                                                    "all": 23423873,
                                                    "country": {
                                                      "US": 123,
                                                      "CN": 523423,
                                                      "AU": 91
                                                    },
                                                    "type": {
                                                      "user.ban.ip": 123,
                                                      "hot.ban.unknown": 5324,
                                                      "macro.chl.captchaErr": 1341,
                                                      "macro.chl.jschlErr": 5323
                                                    }
                                                  }
                                                }
                                              }
                                            ],
                                            "query": {
                                              "since": "2015-01-01T12:23:00Z",
                                              "until": "2015-01-02T12:23:00Z",
                                              "time_delta": 60
                                            }
                                          }

                                          DNS Analytics

                                          Analytics data for a zone.

                                          $dns-analytics

                                          Metrics

                                          A metric is a numerical value that is based on an attribute of the data, for example a query count.

                                          In API requests, metrics are set in the metrics parameter. If you need to list multiple metrics, separate them with commas.

                                          MetricNameExampleUnit
                                          queryCountQuery count1000Count
                                          uncachedCountUncached query count1Count
                                          staleCountStale query count1Count
                                          responseTimeAvgAverage response time1.0Time in milliseconds.
                                          responseTimeMedianMedian response time1.0Time in milliseconds.
                                          responseTime90th90th percentile response time1.0Time in milliseconds.
                                          responseTime99th99th percentile response time1.0Time in milliseconds.

                                          Dimensions

                                          Dimensions can be used to break down the data by given attributes.

                                          In API requests, dimensions are set in the dimensions parameter. If you need to list multiple dimensions, separate them with commas.

                                          DimensionNameExampleNotes
                                          queryNameQuery Nameexample.com
                                          queryTypeQuery TypeAAAATypes defined by IANA, unknown types are empty.
                                          responseCodeResponse CodeNOERRORResponse codes defined by IANA (always uppercase).
                                          responseCachedResponse CachedCachedEither Cached or Uncached.
                                          coloNameColo NameSJCPoP code.
                                          originOrigin2001:db8::1Origin used to resolve the query (empty if N/A or if the query was answered from cache).
                                          dayOfWeekDay Of Week1Break down by day of week, (Monday is 1, and Sunday is 7).
                                          tcpTCP1Either 1 or 0 depending on the protocol used.
                                          ipVersionIP Version6IP protocol version used (currently 4 or 6).
                                          querySizeBucketQuery Size Bucket16-31Query size bucket by multiples of 16.
                                          responseSizeBucketResponse Size Bucket16-31Response size bucket by multiples of 16.

                                          Filters

                                          A filter uses the form: dimension operator expression

                                          In this syntax:

                                          • name — the name of the dimension or metric to filter on. For example: queryName
                                          • operator — defines the type of filter match to use. Operators are specific to either dimensions or metrics.
                                          • expression — states the values to be included in or excluded from the results. Expressions use regular expression syntax

                                          Filter Operators

                                          OperatorNameExampleNotesURL Encoded
                                          ==EqualsqueryName==example.comReturn results where queryName is exactly example.com%3D%3D
                                          !=Does not equalresponseCode!=NOERRORReturn results where response code is different from NOERROR.!%3D
                                          >Greater thanqueryCount>1000Return results where query count is higher than 1000%3E
                                          <Less thanqueryCount<1000Return results where query count is lower than 1000%3C
                                          >=Greater than or equal toqueryCount>=1000Return results where query count is higher than or equal to 1000%3E%3D
                                          <=Less than or equal toqueryCount<=1000Return results where query count is lower than or equal to 1000%3C%3D

                                          Combining Filters

                                          Filters can be combined using OR and AND boolean logic. AND takes precedence over OR in all the expressions.

                                          OR

                                          The OR operator is defined using a comma (,) or OR keyword surrounded by whitespace.

                                          Examples:

                                          • Response code is either NOERROR or NXDOMAIN: responseCode==NOERROR,responseCode==NXDOMAIN
                                          • Queries in either SJC or LAX: coloName==SJC OR coloName==LAX

                                          AND

                                          The AND operator is defined using a semicolon (;) or AND keyword surrounded by whitespace.

                                          Examples:

                                          • Response code is NOERROR and query type is AAAA: responseCode==NOERROR;queryType==AAAA
                                          • AAAA queries in SJC: queryType==AAAA AND coloName==SJC
                                          dns-analytics-table

                                          GET Table

                                          Retrieves a list of summarised aggregate metrics over a given time period.

                                          GET zones/:identifier/dns_analytics/report

                                          Required parameters

                                          Name /typeDescription /exampleConstraints
                                          dimensions
                                          array

                                          Array of dimensions

                                          [ "responseCode", "queryName" ]
                                          An array with items in the following form:
                                            metrics
                                            array

                                            Array of metrics

                                            [ "queryCount", "responseTimeAvg" ]
                                            An array with items in the following form:
                                              since
                                              string (date-time)

                                              Start date and time of requesting data period in the ISO8601 format

                                              "2016-11-11T12:00:00Z"
                                                until
                                                string (date-time)

                                                End date and time of requesting data period in the ISO8601 format

                                                "2016-11-11T13:00:00Z"

                                                  Optional parameters

                                                  Name /typeDescription /exampleConstraints
                                                  sort
                                                  array

                                                  Array of dimensions to sort by, each dimension may be prefixed by - (descending) or + (ascending)

                                                  [ "+responseCode", "-queryName" ]
                                                  An array with items in the following form:
                                                    filters
                                                    string

                                                    Segmentation filter in 'attribute operator value' format

                                                    "responseCode==NOERROR"
                                                      limit
                                                      integer

                                                      Limit number of returned metrics, default is 100

                                                      100
                                                        cURL (example)
                                                        curl -X GET "https://api.cloudflare.com/client/v4/zones/9a7806061c88ada191ed06f989cc3dac/dns_analytics/report?dimensions=responseCode,queryName&metrics=queryCount,responseTimeAvg&sort=+responseCode,-queryName&filters=responseCode==NOERROR&since=2016-11-11T12:00:00Z&until=2016-11-11T13:00:00Z&limit=100" \
                                                             -H "X-Auth-Email: [email protected]" \
                                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                             -H "Content-Type: application/json"
                                                        Response (example)
                                                        {
                                                          "success": true,
                                                          "errors": [],
                                                          "messages": [],
                                                          "result": {
                                                            "data": {
                                                              "dimensions": [
                                                                {
                                                                  "name": "NODATA"
                                                                }
                                                              ],
                                                              "metrics": [
                                                                1.5,
                                                                2
                                                              ]
                                                            },
                                                            "totals": {
                                                              "queryCount": 1000,
                                                              "responseTimeAvg": 1
                                                            },
                                                            "min": {
                                                              "queryCount": 1000,
                                                              "responseTimeAvg": 1
                                                            },
                                                            "max": {
                                                              "queryCount": 1000,
                                                              "responseTimeAvg": 1
                                                            }
                                                          },
                                                          "query": {
                                                            "dimensions": [
                                                              "responseCode",
                                                              "queryName"
                                                            ],
                                                            "metrics": [
                                                              "queryCount",
                                                              "responseTimeAvg"
                                                            ],
                                                            "sort": [
                                                              "+responseCode",
                                                              "-queryName"
                                                            ],
                                                            "filters": "responseCode==NOERROR",
                                                            "since": "2016-11-11T12:00:00Z",
                                                            "until": "2016-11-11T13:00:00Z",
                                                            "limit": 100
                                                          }
                                                        }
                                                        dns-analytics-by-time

                                                        GET By Time

                                                        Retrieves a list of aggregate metrics grouped by time interval.

                                                        GET zones/:identifier/dns_analytics/report/bytime

                                                        Optional parameters

                                                        Name /typeDescription /exampleConstraints
                                                        dimensions
                                                        array

                                                        Array of dimensions

                                                        [ "responseCode", "queryName" ]
                                                        An array with items in the following form:
                                                          metrics
                                                          array

                                                          Array of metrics

                                                          [ "queryCount", "responseTimeAvg" ]
                                                          An array with items in the following form:
                                                            sort
                                                            array

                                                            Array of dimensions to sort by, each dimension may be prefixed by - (descending) or + (ascending)

                                                            [ "+responseCode", "-queryName" ]
                                                            An array with items in the following form:
                                                              filters
                                                              string

                                                              Segmentation filter in 'attribute operator value' format

                                                              "responseCode==NOERROR"
                                                                since
                                                                string (date-time)

                                                                Start date and time of requesting data period in the ISO8601 format

                                                                "2016-11-11T12:00:00Z"
                                                                  until
                                                                  string (date-time)

                                                                  End date and time of requesting data period in the ISO8601 format

                                                                  "2016-11-11T13:00:00Z"
                                                                    limit
                                                                    integer

                                                                    Limit number of returned metrics, default is 100

                                                                    100
                                                                      time_delta

                                                                      Unit of time to group data by

                                                                      "hour"
                                                                      • valid values: all, auto, year, quarter, month, week, day, hour, dekaminute, minute
                                                                      cURL (example)
                                                                      curl -X GET "https://api.cloudflare.com/client/v4/zones/9a7806061c88ada191ed06f989cc3dac/dns_analytics/report/bytime?dimensions=responseCode,queryName&metrics=queryCount,responseTimeAvg&sort=+responseCode,-queryName&filters=responseCode==NOERROR&since=2016-11-11T12:00:00Z&until=2016-11-11T13:00:00Z&limit=100&time_delta=hour" \
                                                                           -H "X-Auth-Email: [email protected]" \
                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                           -H "Content-Type: application/json"
                                                                      Response (example)
                                                                      {
                                                                        "success": true,
                                                                        "errors": [],
                                                                        "messages": [],
                                                                        "result": {
                                                                          "data": {
                                                                            "dimensions": [
                                                                              {
                                                                                "name": "NODATA"
                                                                              }
                                                                            ],
                                                                            "metrics": [
                                                                              [
                                                                                1.5,
                                                                                2
                                                                              ],
                                                                              [
                                                                                2.3,
                                                                                1.5
                                                                              ]
                                                                            ]
                                                                          },
                                                                          "totals": {
                                                                            "queryCount": 1000,
                                                                            "responseTimeAvg": 1
                                                                          },
                                                                          "min": {
                                                                            "queryCount": 1000,
                                                                            "responseTimeAvg": 1
                                                                          },
                                                                          "max": {
                                                                            "queryCount": 1000,
                                                                            "responseTimeAvg": 1
                                                                          }
                                                                        },
                                                                        "query": {
                                                                          "dimensions": [
                                                                            "responseCode",
                                                                            "queryName"
                                                                          ],
                                                                          "metrics": [
                                                                            "queryCount",
                                                                            "responseTimeAvg"
                                                                          ],
                                                                          "sort": [
                                                                            "+responseCode",
                                                                            "-queryName"
                                                                          ],
                                                                          "filters": "responseCode==NOERROR",
                                                                          "since": "2016-11-11T12:00:00Z",
                                                                          "until": "2016-11-11T13:00:00Z",
                                                                          "limit": 100,
                                                                          "time_delta": "hour"
                                                                        }
                                                                      }

                                                                      Railgun

                                                                      Cloudflare Railgun

                                                                      railgun

                                                                      Object definition

                                                                      View properties and constraints defined on the object

                                                                      Show definition

                                                                      railgun-create-railgun

                                                                      POST Create Railgun
                                                                      • free
                                                                      • pro
                                                                      • business
                                                                      • enterprise

                                                                      POST railguns

                                                                      Required parameters

                                                                      Name /typeDescription /exampleConstraints
                                                                      name
                                                                      string

                                                                      Readable identifier of the railgun

                                                                      "My Railgun"
                                                                      • max length: 160
                                                                      cURL (example)
                                                                      curl -X POST "https://api.cloudflare.com/client/v4/railguns" \
                                                                           -H "X-Auth-Email: [email protected]" \
                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                           -H "Content-Type: application/json" \
                                                                           --data '{"name":"My Railgun"}'
                                                                      Response (example)
                                                                      {
                                                                        "success": true,
                                                                        "errors": [],
                                                                        "messages": [],
                                                                        "result": {
                                                                          "id": "e928d310693a83094309acf9ead50448",
                                                                          "name": "My Railgun",
                                                                          "status": "active",
                                                                          "enabled": true,
                                                                          "zones_connected": 2,
                                                                          "build": "b1234",
                                                                          "version": "2.1",
                                                                          "revision": "123",
                                                                          "activation_key": "e4edc00281cb56ebac22c81be9bac8f3",
                                                                          "activated_on": "2014-01-02T02:20:00Z",
                                                                          "created_on": "2014-01-01T05:20:00Z",
                                                                          "modified_on": "2014-01-01T05:20:00Z"
                                                                        }
                                                                      }
                                                                      railgun-list-railguns

                                                                      GET List Railguns
                                                                      • free
                                                                      • pro
                                                                      • business
                                                                      • enterprise

                                                                      List, search, sort and filter your Railguns

                                                                      GET railguns

                                                                      Optional parameters

                                                                      Name /typeDescription /exampleConstraints
                                                                      page
                                                                      number

                                                                      Page number of paginated results

                                                                      1
                                                                      • default value: 1
                                                                      • min value:1
                                                                      per_page
                                                                      number

                                                                      Number of items per page

                                                                      20
                                                                      • default value: 20
                                                                      • min value:5
                                                                      • max value:50
                                                                      direction

                                                                      Direction to order Railguns

                                                                      "desc"
                                                                      • valid values: asc, desc
                                                                      cURL (example)
                                                                      curl -X GET "https://api.cloudflare.com/client/v4/railguns?page=1&per_page=20&direction=desc" \
                                                                           -H "X-Auth-Email: [email protected]" \
                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                           -H "Content-Type: application/json"
                                                                      Response (example)
                                                                      {
                                                                        "success": true,
                                                                        "errors": [],
                                                                        "messages": [],
                                                                        "result": [
                                                                          {
                                                                            "id": "e928d310693a83094309acf9ead50448",
                                                                            "name": "My Railgun",
                                                                            "status": "active",
                                                                            "enabled": true,
                                                                            "zones_connected": 2,
                                                                            "build": "b1234",
                                                                            "version": "2.1",
                                                                            "revision": "123",
                                                                            "activation_key": "e4edc00281cb56ebac22c81be9bac8f3",
                                                                            "activated_on": "2014-01-02T02:20:00Z",
                                                                            "created_on": "2014-01-01T05:20:00Z",
                                                                            "modified_on": "2014-01-01T05:20:00Z"
                                                                          }
                                                                        ],
                                                                        "result_info": {
                                                                          "page": 1,
                                                                          "per_page": 20,
                                                                          "count": 1,
                                                                          "total_count": 2000
                                                                        }
                                                                      }
                                                                      railgun-railgun-details

                                                                      GET Railgun details
                                                                      • free
                                                                      • pro
                                                                      • business
                                                                      • enterprise

                                                                      GET railguns/:identifier
                                                                      cURL (example)
                                                                      curl -X GET "https://api.cloudflare.com/client/v4/railguns/e928d310693a83094309acf9ead50448" \
                                                                           -H "X-Auth-Email: [email protected]" \
                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                           -H "Content-Type: application/json"
                                                                      Response (example)
                                                                      {
                                                                        "success": true,
                                                                        "errors": [],
                                                                        "messages": [],
                                                                        "result": {
                                                                          "id": "e928d310693a83094309acf9ead50448",
                                                                          "name": "My Railgun",
                                                                          "status": "active",
                                                                          "enabled": true,
                                                                          "zones_connected": 2,
                                                                          "build": "b1234",
                                                                          "version": "2.1",
                                                                          "revision": "123",
                                                                          "activation_key": "e4edc00281cb56ebac22c81be9bac8f3",
                                                                          "activated_on": "2014-01-02T02:20:00Z",
                                                                          "created_on": "2014-01-01T05:20:00Z",
                                                                          "modified_on": "2014-01-01T05:20:00Z"
                                                                        }
                                                                      }
                                                                      railgun-get-zones-connected-to-a-railgun

                                                                      GET Get zones connected to a Railgun
                                                                      • free
                                                                      • pro
                                                                      • business
                                                                      • enterprise

                                                                      The zones that are currently using this Railgun

                                                                      GET railguns/:identifier/zones
                                                                      cURL (example)
                                                                      curl -X GET "https://api.cloudflare.com/client/v4/railguns/e928d310693a83094309acf9ead50448/zones" \
                                                                           -H "X-Auth-Email: [email protected]" \
                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                           -H "Content-Type: application/json"
                                                                      Response (example)
                                                                      {
                                                                        "success": true,
                                                                        "errors": [],
                                                                        "messages": [],
                                                                        "result": [
                                                                          {
                                                                            "id": "023e105f4ecef8ad9ca31a8372d0c353",
                                                                            "name": "example.com",
                                                                            "development_mode": 7200,
                                                                            "original_name_servers": [
                                                                              "ns1.originaldnshost.com",
                                                                              "ns2.originaldnshost.com"
                                                                            ],
                                                                            "original_registrar": "GoDaddy",
                                                                            "original_dnshost": "NameCheap",
                                                                            "created_on": "2014-01-01T05:20:00.12345Z",
                                                                            "modified_on": "2014-01-01T05:20:00.12345Z"
                                                                          }
                                                                        ],
                                                                        "result_info": {
                                                                          "page": 1,
                                                                          "per_page": 20,
                                                                          "count": 1,
                                                                          "total_count": 2000
                                                                        }
                                                                      }
                                                                      railgun-enable-or-disable-a-railgun

                                                                      PATCH Enable or disable a Railgun
                                                                      • free
                                                                      • pro
                                                                      • business
                                                                      • enterprise

                                                                      Enable or disable a Railgun for all zones connected to it

                                                                      PATCH railguns/:identifier

                                                                      Required parameters

                                                                      Name /typeDescription /exampleConstraints
                                                                      enabled
                                                                      boolean

                                                                      Flag to determine if the Railgun is accepting connections

                                                                      true
                                                                      • default value: false
                                                                      • valid values: (true,false)
                                                                      cURL (example)
                                                                      curl -X PATCH "https://api.cloudflare.com/client/v4/railguns/e928d310693a83094309acf9ead50448" \
                                                                           -H "X-Auth-Email: [email protected]" \
                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                           -H "Content-Type: application/json" \
                                                                           --data '{"enabled":true}'
                                                                      Response (example)
                                                                      {
                                                                        "success": true,
                                                                        "errors": [],
                                                                        "messages": [],
                                                                        "result": {
                                                                          "id": "e928d310693a83094309acf9ead50448",
                                                                          "name": "My Railgun",
                                                                          "status": "active",
                                                                          "enabled": true,
                                                                          "zones_connected": 2,
                                                                          "build": "b1234",
                                                                          "version": "2.1",
                                                                          "revision": "123",
                                                                          "activation_key": "e4edc00281cb56ebac22c81be9bac8f3",
                                                                          "activated_on": "2014-01-02T02:20:00Z",
                                                                          "created_on": "2014-01-01T05:20:00Z",
                                                                          "modified_on": "2014-01-01T05:20:00Z"
                                                                        }
                                                                      }
                                                                      railgun-delete-railgun

                                                                      DELETE Delete Railgun
                                                                      • free
                                                                      • pro
                                                                      • business
                                                                      • enterprise

                                                                      Disable and delete a Railgun. This will immediately disable the Railgun for any connected zones

                                                                      DELETE railguns/:identifier
                                                                      cURL (example)
                                                                      curl -X DELETE "https://api.cloudflare.com/client/v4/railguns/e928d310693a83094309acf9ead50448" \
                                                                           -H "X-Auth-Email: [email protected]" \
                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                           -H "Content-Type: application/json"
                                                                      Response (example)
                                                                      {
                                                                        "success": true,
                                                                        "errors": [],
                                                                        "messages": [],
                                                                        "result": {
                                                                          "id": "e928d310693a83094309acf9ead50448"
                                                                        }
                                                                      }

                                                                      Custom Pages for a Zone

                                                                      Custom pages associated with a zone

                                                                      custom-pages-for-a-zone

                                                                      Object definitions

                                                                      View properties and constraints defined on the object

                                                                      Show definitions

                                                                      custom-pages-for-a-zone-available-custom-pages

                                                                      GET Available Custom Pages permission needed: #zone_settings:read
                                                                      • free
                                                                      • pro
                                                                      • business
                                                                      • enterprise

                                                                      A list of available Custom Pages the zone can use

                                                                      GET zones/:zone_identifier/custom_pages
                                                                      cURL (example)
                                                                      curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_pages" \
                                                                           -H "X-Auth-Email: [email protected]" \
                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                           -H "Content-Type: application/json"
                                                                      Response (example)
                                                                      {
                                                                        "success": true,
                                                                        "errors": [],
                                                                        "messages": [],
                                                                        "result": [
                                                                          {
                                                                            "id": "basic_challenge",
                                                                            "created_on": "2014-01-01T05:20:00.12345Z",
                                                                            "modified_on": "2014-01-01T05:20:00.12345Z",
                                                                            "url": "http://www.example.com",
                                                                            "state": "default",
                                                                            "required_tokens": [
                                                                              "::CAPTCHA_BOX::"
                                                                            ],
                                                                            "preview_target": "preview:target",
                                                                            "description": true
                                                                          }
                                                                        ],
                                                                        "result_info": {
                                                                          "page": 1,
                                                                          "per_page": 20,
                                                                          "count": 1,
                                                                          "total_count": 2000
                                                                        }
                                                                      }
                                                                      custom-pages-for-a-zone-custom-page-details

                                                                      GET Custom Page details permission needed: #zone_settings:read
                                                                      • free
                                                                      • pro
                                                                      • business
                                                                      • enterprise

                                                                      Details about a specific Custom page details

                                                                      GET zones/:zone_identifier/custom_pages/:identifier
                                                                      cURL (example)
                                                                      curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_pages/basic_challenge" \
                                                                           -H "X-Auth-Email: [email protected]" \
                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                           -H "Content-Type: application/json"
                                                                      Response (example)
                                                                      {
                                                                        "success": true,
                                                                        "errors": [],
                                                                        "messages": [],
                                                                        "result": {
                                                                          "id": "basic_challenge",
                                                                          "created_on": "2014-01-01T05:20:00.12345Z",
                                                                          "modified_on": "2014-01-01T05:20:00.12345Z",
                                                                          "url": "http://www.example.com",
                                                                          "state": "default",
                                                                          "required_tokens": [
                                                                            "::CAPTCHA_BOX::"
                                                                          ],
                                                                          "preview_target": "preview:target",
                                                                          "description": true
                                                                        }
                                                                      }
                                                                      custom-pages-for-a-zone-update-custom-page-url

                                                                      PUT Update Custom page URL permission needed: #zone_settings:edit
                                                                      • free
                                                                      • pro
                                                                      • business
                                                                      • enterprise

                                                                      Update Custom page URL

                                                                      PUT zones/:zone_identifier/custom_pages/:identifier

                                                                      Required parameters

                                                                      Name /typeDescription /exampleConstraints
                                                                      url
                                                                      string (url)

                                                                      A URL that is associated with the Custom Page.

                                                                      "http://www.example.com"
                                                                      • default value:
                                                                      state

                                                                      The Custom Page state

                                                                      "default"
                                                                      • valid values: default, customized
                                                                      cURL (example)
                                                                      curl -X PUT "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_pages/basic_challenge" \
                                                                           -H "X-Auth-Email: [email protected]" \
                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                           -H "Content-Type: application/json" \
                                                                           --data '{"url":"http://www.example.com","state":"default"}'
                                                                      Response (example)
                                                                      {
                                                                        "success": true,
                                                                        "errors": [],
                                                                        "messages": [],
                                                                        "result": {
                                                                          "id": "basic_challenge",
                                                                          "created_on": "2014-01-01T05:20:00.12345Z",
                                                                          "modified_on": "2014-01-01T05:20:00.12345Z",
                                                                          "url": "http://www.example.com",
                                                                          "state": "default",
                                                                          "required_tokens": [
                                                                            "::CAPTCHA_BOX::"
                                                                          ],
                                                                          "preview_target": "preview:target",
                                                                          "description": true
                                                                        }
                                                                      }

                                                                      Custom Pages for a Zone error codes

                                                                      CodeDescription
                                                                      1210That operation is no longer allowed for that domain.
                                                                      1001Invalid request. Could not connect to database
                                                                      1211Could not find a valid customization page to disable
                                                                      1002Validator dispatcher expects an array
                                                                      1200A URL is required
                                                                      1212An undocumented error has occurred and has been logged.
                                                                      1201The URL provided seems to be irregular
                                                                      1213That operation has already been performed for this challenge/error.
                                                                      1004Cannot find a valid zone
                                                                      1202Unable to grab the content for the URL provided. Please try again.
                                                                      1214Rate limit reached for this operation. Please try again in a minute
                                                                      1203Your custom page must be larger than <characters> characters
                                                                      1215Rate limit reached for this operation. Please try again in a minute
                                                                      1006Cannot find a valid customization page
                                                                      1204Your custom page must be smaller than <characters> characters
                                                                      1007Invalid validation method being called
                                                                      1205A <token> token was not detected on the error page, and must be added before this page can be integrated into Cloudflare. The default error page will show until this is corrected and rescanned.
                                                                      1217Invalid state passed
                                                                      1206Could not find a valid zone
                                                                      1218Missing Custom Page state
                                                                      1207That customization page is not modifiable
                                                                      1219Please upgrade to access this feature
                                                                      1208An unknown error has occurred and has been logged. We will fix this problem promptly. We apologize for the inconvenience.
                                                                      1209Could not find a valid customization page for this operation
                                                                      1220We were unable to scan the page provided. Please ensure it is accessible publicly and is larger than 100 characters
                                                                      1000Invalid user

                                                                      Custom SSL for a Zone

                                                                      Custom SSL certificate for a zone

                                                                      custom-ssl-for-a-zone

                                                                      Object definition

                                                                      View properties and constraints defined on the object

                                                                      Show definition

                                                                      custom-ssl-for-a-zone-create-ssl-configuration

                                                                      POST Create SSL configuration permission needed: #ssl:edit
                                                                      • free
                                                                      • pro
                                                                      • business
                                                                      • enterprise

                                                                      Upload a new SSL certificate for a zone

                                                                      POST zones/:zone_identifier/custom_certificates

                                                                      Required parameters

                                                                      Name /typeDescription /exampleConstraints
                                                                      certificate
                                                                      string

                                                                      The zone's SSL certificate or certificate and the intermediate(s)

                                                                      "-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n"
                                                                        private_key
                                                                        string

                                                                        The zone's private key

                                                                        "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n"

                                                                          Optional parameters

                                                                          Name /typeDescription /exampleConstraints
                                                                          bundle_method

                                                                          A ubiquitous bundle is a bundle that has a higher probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle is a bundle with the shortest chain and newest intermediates. A forced method attempt to use the certificate/chain as defined by the input

                                                                          "ubiquitous"
                                                                          • default value: ubiquitous
                                                                          • valid values: ubiquitous, optimal, force
                                                                          geo_restrictions
                                                                          object

                                                                          Specify the region where your private key can be held locally for optimal TLS performance. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Options allow distribution to only to U.S. data centers, only to E.U. data centers, or only to highest security data centers. Default distribution is to all Cloudflare datacenters, for optimal performance.

                                                                          { "label": "us" }
                                                                          An object with the following properties:
                                                                          • valid values: us, eu, highest_security
                                                                          cURL (example)
                                                                          curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_certificates" \
                                                                               -H "X-Auth-Email: [email protected]" \
                                                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                               -H "Content-Type: application/json" \
                                                                               --data '{"certificate":"-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n","private_key":"-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n","bundle_method":"ubiquitous","geo_restrictions":{"label":"us"}}'
                                                                          Response (example)
                                                                          {
                                                                            "success": true,
                                                                            "errors": [],
                                                                            "messages": [],
                                                                            "result": {
                                                                              "id": "7e7b8deba8538af625850b7b2530034c",
                                                                              "hosts": [
                                                                                "example.com"
                                                                              ],
                                                                              "issuer": "GlobalSign",
                                                                              "signature": "SHA256WithRSA",
                                                                              "status": "active",
                                                                              "bundle_method": "ubiquitous",
                                                                              "geo_restrictions": {
                                                                                "label": "us"
                                                                              },
                                                                              "zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
                                                                              "uploaded_on": "2014-01-01T05:20:00Z",
                                                                              "modified_on": "2014-01-01T05:20:00Z",
                                                                              "expires_on": "2016-01-01T05:20:00Z",
                                                                              "priority": 1
                                                                            }
                                                                          }
                                                                          custom-ssl-for-a-zone-list-ssl-configurations

                                                                          GET List SSL configurations permission needed: #ssl:read
                                                                          • free
                                                                          • pro
                                                                          • business
                                                                          • enterprise

                                                                          List, search, sort, and filter all of your custom SSL certificates. The priority fields deteremines the order in which the certificate will be used in a request. Higher numbers will be tried first.

                                                                          GET zones/:zone_identifier/custom_certificates

                                                                          Optional parameters

                                                                          Name /typeDescription /exampleConstraints
                                                                          status

                                                                          Status of the zone's custom SSL

                                                                          "active"
                                                                          • valid values: active, expired, deleted
                                                                          • read only
                                                                          page
                                                                          number

                                                                          Page number of paginated results

                                                                          1
                                                                          • default value: 1
                                                                          • min value:1
                                                                          per_page
                                                                          number

                                                                          Number of zones per page

                                                                          20
                                                                          • default value: 20
                                                                          • min value:5
                                                                          • max value:50
                                                                          order

                                                                          Field to order certificates by

                                                                          "status"
                                                                          • default value: priority
                                                                          • valid values: status, issuer, priority, expires_on
                                                                          direction

                                                                          Direction to order zones

                                                                          "desc"
                                                                          • valid values: asc, desc
                                                                          match

                                                                          Whether to match all search requirements or at least one (any)

                                                                          "all"
                                                                          • default value: all
                                                                          • valid values: any, all
                                                                          cURL (example)
                                                                          curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_certificates?status=active&page=1&per_page=20&order=status&direction=desc&match=all" \
                                                                               -H "X-Auth-Email: [email protected]" \
                                                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                               -H "Content-Type: application/json"
                                                                          Response (example)
                                                                          {
                                                                            "success": true,
                                                                            "errors": [],
                                                                            "messages": [],
                                                                            "result": [
                                                                              {
                                                                                "id": "7e7b8deba8538af625850b7b2530034c",
                                                                                "hosts": [
                                                                                  "example.com"
                                                                                ],
                                                                                "issuer": "GlobalSign",
                                                                                "signature": "SHA256WithRSA",
                                                                                "status": "active",
                                                                                "bundle_method": "ubiquitous",
                                                                                "geo_restrictions": {
                                                                                  "label": "us"
                                                                                },
                                                                                "zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
                                                                                "uploaded_on": "2014-01-01T05:20:00Z",
                                                                                "modified_on": "2014-01-01T05:20:00Z",
                                                                                "expires_on": "2016-01-01T05:20:00Z",
                                                                                "priority": 1
                                                                              }
                                                                            ],
                                                                            "result_info": {
                                                                              "page": 1,
                                                                              "per_page": 20,
                                                                              "count": 1,
                                                                              "total_count": 2000
                                                                            }
                                                                          }
                                                                          custom-ssl-for-a-zone-ssl-configuration-details

                                                                          GET SSL configuration details permission needed: #ssl:read
                                                                          • free
                                                                          • pro
                                                                          • business
                                                                          • enterprise

                                                                          GET zones/:zone_identifier/custom_certificates/:identifier
                                                                          cURL (example)
                                                                          curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_certificates/7e7b8deba8538af625850b7b2530034c" \
                                                                               -H "X-Auth-Email: [email protected]" \
                                                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                               -H "Content-Type: application/json"
                                                                          Response (example)
                                                                          {
                                                                            "success": true,
                                                                            "errors": [],
                                                                            "messages": [],
                                                                            "result": {
                                                                              "id": "7e7b8deba8538af625850b7b2530034c",
                                                                              "hosts": [
                                                                                "example.com"
                                                                              ],
                                                                              "issuer": "GlobalSign",
                                                                              "signature": "SHA256WithRSA",
                                                                              "status": "active",
                                                                              "bundle_method": "ubiquitous",
                                                                              "geo_restrictions": {
                                                                                "label": "us"
                                                                              },
                                                                              "zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
                                                                              "uploaded_on": "2014-01-01T05:20:00Z",
                                                                              "modified_on": "2014-01-01T05:20:00Z",
                                                                              "expires_on": "2016-01-01T05:20:00Z",
                                                                              "priority": 1
                                                                            }
                                                                          }
                                                                          custom-ssl-for-a-zone-update-ssl-configuration

                                                                          PATCH Update SSL configuration permission needed: #ssl:edit
                                                                          • free
                                                                          • pro
                                                                          • business
                                                                          • enterprise

                                                                          Upload a new private key and/or PEM/CRT for the SSL certificate

                                                                          PATCH zones/:zone_identifier/custom_certificates/:identifier

                                                                          Optional parameters

                                                                          Name /typeDescription /exampleConstraints
                                                                          private_key
                                                                          string

                                                                          The zone's private key

                                                                          "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n"
                                                                            certificate
                                                                            string

                                                                            The zone's SSL certificate or certificate and the intermediate(s)

                                                                            "-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n"
                                                                              bundle_method

                                                                              A ubiquitous bundle is a bundle that has a higher probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle is a bundle with the shortest chain and newest intermediates. A forced method attempt to use the certificate/chain as defined by the input

                                                                              "ubiquitous"
                                                                              • default value: ubiquitous
                                                                              • valid values: ubiquitous, optimal, force
                                                                              geo_restrictions
                                                                              object

                                                                              Specify the region where your private key can be held locally for optimal TLS performance. HTTPS connections to any excluded data center will still be fully encrypted, but will incur some latency while Keyless SSL is used to complete the handshake with the nearest allowed data center. Options allow distribution to only to U.S. data centers, only to E.U. data centers, or only to highest security data centers. Default distribution is to all Cloudflare datacenters, for optimal performance.

                                                                              { "label": "us" }
                                                                              An object with the following properties:
                                                                              • valid values: us, eu, highest_security
                                                                              cURL (example)
                                                                              curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_certificates/7e7b8deba8538af625850b7b2530034c" \
                                                                                   -H "X-Auth-Email: [email protected]" \
                                                                                   -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                   -H "Content-Type: application/json" \
                                                                                   --data '{"private_key":"-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n","certificate":"-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n","bundle_method":"ubiquitous","geo_restrictions":{"label":"us"}}'
                                                                              Response (example)
                                                                              {
                                                                                "success": true,
                                                                                "errors": [],
                                                                                "messages": [],
                                                                                "result": {
                                                                                  "id": "7e7b8deba8538af625850b7b2530034c",
                                                                                  "hosts": [
                                                                                    "example.com"
                                                                                  ],
                                                                                  "issuer": "GlobalSign",
                                                                                  "signature": "SHA256WithRSA",
                                                                                  "status": "active",
                                                                                  "bundle_method": "ubiquitous",
                                                                                  "geo_restrictions": {
                                                                                    "label": "us"
                                                                                  },
                                                                                  "zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
                                                                                  "uploaded_on": "2014-01-01T05:20:00Z",
                                                                                  "modified_on": "2014-01-01T05:20:00Z",
                                                                                  "expires_on": "2016-01-01T05:20:00Z",
                                                                                  "priority": 1
                                                                                }
                                                                              }
                                                                              custom-ssl-for-a-zone-re-prioritize-ssl-certificates

                                                                              PUT Re-prioritize SSL certificates permission needed: #ssl:edit
                                                                              • free
                                                                              • pro
                                                                              • business
                                                                              • enterprise

                                                                              If a zone has multiple SSL certificates, you can set the order in which they should be used during a request. Higher priority numbers will be tried first.

                                                                              PUT zones/:zone_identifier/custom_certificates/prioritize

                                                                              Required parameters

                                                                              Name /typeDescription /exampleConstraints
                                                                              certificates
                                                                              array

                                                                              Array of ordered certificates.

                                                                              [ { "id": "5a7805061c76ada191ed06f989cc3dac", "priority": 2 }, { "id": "9a7806061c88ada191ed06f989cc3dac", "priority": 1 } ]
                                                                              An array with items in the following form:
                                                                                cURL (example)
                                                                                curl -X PUT "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_certificates/prioritize" \
                                                                                     -H "X-Auth-Email: [email protected]" \
                                                                                     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                     -H "Content-Type: application/json" \
                                                                                     --data '{"certificates":[{"id":"5a7805061c76ada191ed06f989cc3dac","priority":2},{"id":"9a7806061c88ada191ed06f989cc3dac","priority":1}]}'
                                                                                Response (example)
                                                                                {
                                                                                  "success": true,
                                                                                  "errors": [],
                                                                                  "messages": [],
                                                                                  "result": [
                                                                                    {
                                                                                      "id": "7e7b8deba8538af625850b7b2530034c",
                                                                                      "hosts": [
                                                                                        "example.com"
                                                                                      ],
                                                                                      "issuer": "GlobalSign",
                                                                                      "signature": "SHA256WithRSA",
                                                                                      "status": "active",
                                                                                      "bundle_method": "ubiquitous",
                                                                                      "geo_restrictions": {
                                                                                        "label": "us"
                                                                                      },
                                                                                      "zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
                                                                                      "uploaded_on": "2014-01-01T05:20:00Z",
                                                                                      "modified_on": "2014-01-01T05:20:00Z",
                                                                                      "expires_on": "2016-01-01T05:20:00Z",
                                                                                      "priority": 1
                                                                                    }
                                                                                  ],
                                                                                  "result_info": {
                                                                                    "page": 1,
                                                                                    "per_page": 20,
                                                                                    "count": 1,
                                                                                    "total_count": 2000
                                                                                  }
                                                                                }
                                                                                custom-ssl-for-a-zone-delete-an-ssl-certificate

                                                                                DELETE Delete an SSL certificate permission needed: #ssl:edit
                                                                                • free
                                                                                • pro
                                                                                • business
                                                                                • enterprise

                                                                                DELETE zones/:zone_identifier/custom_certificates/:identifier
                                                                                cURL (example)
                                                                                curl -X DELETE "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_certificates/7e7b8deba8538af625850b7b2530034c" \
                                                                                     -H "X-Auth-Email: [email protected]" \
                                                                                     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                     -H "Content-Type: application/json"
                                                                                Response (example)
                                                                                {
                                                                                  "id": "7e7b8deba8538af625850b7b2530034c"
                                                                                }

                                                                                Custom Hostname for a Zone

                                                                                Manage hostnames for your zone that are routed via CNAME.

                                                                                custom-hostname-for-a-zone

                                                                                Object definition

                                                                                View properties and constraints defined on the object

                                                                                Show definition

                                                                                custom-hostname-for-a-zone-create-custom-hostname

                                                                                POST Create custom hostname permission needed: #ssl:edit
                                                                                • free
                                                                                • pro
                                                                                • business
                                                                                • enterprise

                                                                                Add a new custom hostname and request that an SSL certificate be issued for it. One of three validation methods—http, cname, email—should be used, with 'http' recommended if the CNAME is already in place (or will be soon). Specifying 'email' will send an email to the WHOIS contacts on file for the base domain plus hostmaster, postmaster, webmaster, admin, administrator. Specifying 'cname' will return a CNAME that needs to be placed. If http is used and the domain is not already pointing to the Managed CNAME host, the PATCH method must be used once it is (to complete validation).

                                                                                POST zones/:zone_identifier/custom_hostnames

                                                                                Required parameters

                                                                                Name /typeDescription /exampleConstraints
                                                                                hostname
                                                                                string

                                                                                The custom hostname that will point to your hostname via CNAME.

                                                                                "app.example.com"
                                                                                • max length: 255
                                                                                • read only
                                                                                ssl
                                                                                object

                                                                                SSL properties used when creating the custom hostname

                                                                                { "method": "http", "type": "dv" }
                                                                                One of the following:
                                                                                  cURL (example)
                                                                                  curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_hostnames" \
                                                                                       -H "X-Auth-Email: [email protected]" \
                                                                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                       -H "Content-Type: application/json" \
                                                                                       --data '{"hostname":"app.example.com","ssl":{"method":"http","type":"dv"}}'
                                                                                  Response (example)
                                                                                  {
                                                                                    "success": true,
                                                                                    "errors": [],
                                                                                    "messages": [],
                                                                                    "result": {
                                                                                      "id": "0d89c70d-ad9f-4843-b99f-6cc0252067e9",
                                                                                      "hostname": "app.example.com",
                                                                                      "ssl": {
                                                                                        "status": "pending_validation",
                                                                                        "method": "http",
                                                                                        "type": "dv",
                                                                                        "cname_target": "dcv.digicert.com",
                                                                                        "cname": "810b7d5f01154524b961ba0cd578acc2.app.example.com"
                                                                                      }
                                                                                    }
                                                                                  }
                                                                                  custom-hostname-for-a-zone-list-custom-hostnames

                                                                                  GET List custom hostnames permission needed: #ssl:read
                                                                                  • free
                                                                                  • pro
                                                                                  • business
                                                                                  • enterprise

                                                                                  List, search, sort, and filter all of your custom hostnames

                                                                                  GET zones/:zone_identifier/custom_hostnames

                                                                                  Optional parameters

                                                                                  Name /typeDescription /exampleConstraints
                                                                                  hostname
                                                                                  string

                                                                                  Fully qualified domain name to match against. This parameter cannot be used with the 'id' parameter.

                                                                                  "app.example.com"
                                                                                  • max length: 255
                                                                                  id
                                                                                  string

                                                                                  Hostname ID to match against. This ID was generated and returned during the initial custom_hostname creation. This parameter cannot be used with the 'hostname' parameter.

                                                                                  "0d89c70d-ad9f-4843-b99f-6cc0252067e9"
                                                                                  • min length: 36
                                                                                  • max length: 36
                                                                                  page
                                                                                  number

                                                                                  Page number of paginated results

                                                                                  1
                                                                                  • default value: 1
                                                                                  • min value:1
                                                                                  per_page
                                                                                  number

                                                                                  Number of hostnames per page

                                                                                  20
                                                                                  • default value: 20
                                                                                  • min value:5
                                                                                  • max value:50
                                                                                  order

                                                                                  Field to order hostnames by

                                                                                  "ssl"
                                                                                  • default value: ssl
                                                                                  • valid values: ssl, ssl_status
                                                                                  direction

                                                                                  Direction to order hostnames

                                                                                  "desc"
                                                                                  • valid values: asc, desc
                                                                                  ssl

                                                                                  Whether to filter hostnames based on if they have SSL enabled

                                                                                  "0"
                                                                                  • default value: 0
                                                                                  • valid values: 0, 1
                                                                                  cURL (example)
                                                                                  curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_hostnames?hostname=app.example.com&id=0d89c70d-ad9f-4843-b99f-6cc0252067e9&page=1&per_page=20&order=ssl&direction=desc&ssl=0" \
                                                                                       -H "X-Auth-Email: [email protected]" \
                                                                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                       -H "Content-Type: application/json"
                                                                                  Response (example)
                                                                                  {
                                                                                    "success": true,
                                                                                    "errors": [],
                                                                                    "messages": [],
                                                                                    "result": [
                                                                                      {
                                                                                        "id": "0d89c70d-ad9f-4843-b99f-6cc0252067e9",
                                                                                        "hostname": "app.example.com",
                                                                                        "ssl": {
                                                                                          "status": "pending_validation",
                                                                                          "method": "http",
                                                                                          "type": "dv",
                                                                                          "cname_target": "dcv.digicert.com",
                                                                                          "cname": "810b7d5f01154524b961ba0cd578acc2.app.example.com"
                                                                                        }
                                                                                      }
                                                                                    ],
                                                                                    "result_info": {
                                                                                      "page": 1,
                                                                                      "per_page": 20,
                                                                                      "count": 1,
                                                                                      "total_count": 2000
                                                                                    }
                                                                                  }
                                                                                  custom-hostname-for-a-zone-custom-hostname-configuration-details

                                                                                  GET Custom hostname configuration details permission needed: #ssl:read
                                                                                  • free
                                                                                  • pro
                                                                                  • business
                                                                                  • enterprise

                                                                                  GET zones/:zone_identifier/custom_hostnames/:identifier
                                                                                  cURL (example)
                                                                                  curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_hostnames/0d89c70d-ad9f-4843-b99f-6cc0252067e9" \
                                                                                       -H "X-Auth-Email: [email protected]" \
                                                                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                       -H "Content-Type: application/json"
                                                                                  Response (example)
                                                                                  {
                                                                                    "success": true,
                                                                                    "errors": [],
                                                                                    "messages": [],
                                                                                    "result": {
                                                                                      "id": "0d89c70d-ad9f-4843-b99f-6cc0252067e9",
                                                                                      "hostname": "app.example.com",
                                                                                      "ssl": {
                                                                                        "status": "pending_validation",
                                                                                        "method": "http",
                                                                                        "type": "dv",
                                                                                        "cname_target": "dcv.digicert.com",
                                                                                        "cname": "810b7d5f01154524b961ba0cd578acc2.app.example.com"
                                                                                      }
                                                                                    }
                                                                                  }
                                                                                  custom-hostname-for-a-zone-update-custom-hostname-configuration

                                                                                  PATCH Update custom hostname configuration permission needed: #ssl:edit
                                                                                  • free
                                                                                  • pro
                                                                                  • business
                                                                                  • enterprise

                                                                                  Modify SSL configuration for a custom hostname. When sent with SSL config that matches existing config, used to indicate that hostname should pass domain control validation (DCV). Can also be used to change validation type, e.g., from 'http' to 'email'.

                                                                                  PATCH zones/:zone_identifier/custom_hostnames/:identifier

                                                                                  Optional parameters

                                                                                  Name /typeDescription /exampleConstraints
                                                                                  ssl
                                                                                  object

                                                                                  SSL properties used when creating the custom hostname

                                                                                  { "method": "http", "type": "dv" }
                                                                                  One of the following:
                                                                                    cURL (example)
                                                                                    curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_hostnames/0d89c70d-ad9f-4843-b99f-6cc0252067e9" \
                                                                                         -H "X-Auth-Email: [email protected]" \
                                                                                         -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                         -H "Content-Type: application/json" \
                                                                                         --data '{"ssl":{"method":"http","type":"dv"}}'
                                                                                    Response (example)
                                                                                    {
                                                                                      "success": true,
                                                                                      "errors": [],
                                                                                      "messages": [],
                                                                                      "result": {
                                                                                        "id": "0d89c70d-ad9f-4843-b99f-6cc0252067e9",
                                                                                        "hostname": "app.example.com",
                                                                                        "ssl": {
                                                                                          "status": "pending_validation",
                                                                                          "method": "http",
                                                                                          "type": "dv",
                                                                                          "cname_target": "dcv.digicert.com",
                                                                                          "cname": "810b7d5f01154524b961ba0cd578acc2.app.example.com"
                                                                                        }
                                                                                      }
                                                                                    }
                                                                                    custom-hostname-for-a-zone-delete-a-custom-hostname-and-any-issued-ssl-certificates-

                                                                                    DELETE Delete a custom hostname (and any issued SSL certificates) permission needed: #ssl:edit
                                                                                    • free
                                                                                    • pro
                                                                                    • business
                                                                                    • enterprise

                                                                                    DELETE zones/:zone_identifier/custom_hostnames/:identifier
                                                                                    cURL (example)
                                                                                    curl -X DELETE "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/custom_hostnames/0d89c70d-ad9f-4843-b99f-6cc0252067e9" \
                                                                                         -H "X-Auth-Email: [email protected]" \
                                                                                         -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                         -H "Content-Type: application/json"
                                                                                    Response (example)
                                                                                    {
                                                                                      "id": "0d89c70d-ad9f-4843-b99f-6cc0252067e9"
                                                                                    }

                                                                                    Keyless SSL for a Zone

                                                                                    A Keyless certificate is an SSL certificate where the SSL private key is not stored on Cloudflare

                                                                                    keyless-ssl-for-a-zone

                                                                                    Object definition

                                                                                    View properties and constraints defined on the object

                                                                                    Show definition

                                                                                    keyless-ssl-for-a-zone-create-a-keyless-ssl-configuration

                                                                                    POST Create a Keyless SSL configuration permission needed: #ssl:edit
                                                                                    • free
                                                                                    • pro
                                                                                    • business
                                                                                    • enterprise

                                                                                    POST zones/:zone_identifier/keyless_certificates

                                                                                    Required parameters

                                                                                    Name /typeDescription /exampleConstraints
                                                                                    host
                                                                                    string

                                                                                    The keyless SSL name

                                                                                    "example.com"
                                                                                    • max length: 253
                                                                                    • pattern: hostname_or_ip
                                                                                    port
                                                                                    number

                                                                                    The keyless SSL port used to commmunicate between Cloudflare and the client's Keyless SSL server

                                                                                    24008
                                                                                    • default value: 24008
                                                                                    • max length: 65535
                                                                                    certificate
                                                                                    string

                                                                                    The zone's SSL certificate or SSL certificate and intermediate(s)

                                                                                    "-----BEGIN CERTIFICATE----- MIIDtTCCAp2gAwIBAgIJAM15n7fdxhRtMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV BAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX aWRnaXRzIFB0eSBMdGQwHhcNMTQwMzExMTkyMTU5WhcNMTQwNDEwMTkyMTU5WjBF MQswCQYDVQQGEwJVUzETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB CgKCAQEAvq3sKsHpeduJHimOK+fvQdKsI8z8A05MZyyLp2/R/GE8FjNv+hkVY1WQ LIyTNNQH7CJecE1nbTfo8Y56S7x/rhxC6/DJ8MIulapFPnorq46KU6yRxiM0MQ3N nTJHlHA2ozZta6YBBfVfhHWl1F0IfNbXCLKvGwWWMbCx43OfW6KTkbRnE6gFWKuO fSO5h2u5TaWVuSIzBvYs7Vza6m+gtYAvKAJV2nSZ+eSEFPDo29corOy8+huEOUL8 5FAw4BFPsr1TlrlGPFitduQUHGrSL7skk1ESGza0to3bOtrodKei2s9bk5MXm7lZ qI+WZJX4Zu9+mzZhc9pCVi8r/qlXuQIDAQABo4GnMIGkMB0GA1UdDgQWBBRvavf+ sWM4IwKiH9X9w1vl6nUVRDB1BgNVHSMEbjBsgBRvavf+sWM4IwKiH9X9w1vl6nUV RKFJpEcwRTELMAkGA1UEBhMCVVMxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAM15n7fdxhRtMAwGA1UdEwQF MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBABY2ZzBaW0dMsAAT7tPJzrVWVzQx6KU4 UEBLudIlWPlkAwTnINCWR/8eNjCCmGA4heUdHmazdpPa8RzwOmc0NT1NQqzSyktt vTqb4iHD7+8f9MqJ9/FssCfTtqr/Qst/hGH4Wmdf1EJ/6FqYAAb5iRlPgshFZxU8 uXtA8hWn6fK6eISD9HBdcAFToUvKNZ1BIDPvh9f95Ine8ar6yGd56TUNrHR8eHBs ESxz5ddVR/oWRysNJ+aGAyYqHS8S/ttmC7r4XCAHqXptkHPCGRqkAhsterYhd4I8 /cBzejUobNCjjHFbtkAL/SjxZOLW+pNkZwfeYdM8iPkD54Uua1v2tdw= -----END CERTIFICATE-----"

                                                                                      Optional parameters

                                                                                      Name /typeDescription /exampleConstraints
                                                                                      name
                                                                                      string

                                                                                      The keyless SSL name

                                                                                      "example.com Keyless SSL"
                                                                                      • max length: 180
                                                                                      • read only
                                                                                      bundle_method

                                                                                      A ubiquitous bundle is a bundle that has a higher probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle is a bundle with the shortest chain and newest intermediates. A forced method attempt to use the certificate/chain as defined by the input

                                                                                      "ubiquitous"
                                                                                      • default value: ubiquitous
                                                                                      • valid values: ubiquitous, optimal, force
                                                                                      cURL (example)
                                                                                      curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/keyless_certificates" \
                                                                                           -H "X-Auth-Email: [email protected]" \
                                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                           -H "Content-Type: application/json" \
                                                                                           --data '{"host":"example.com","port":24008,"name":"example.com Keyless SSL","certificate":"-----BEGIN CERTIFICATE----- MIIDtTCCAp2gAwIBAgIJAM15n7fdxhRtMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV BAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX aWRnaXRzIFB0eSBMdGQwHhcNMTQwMzExMTkyMTU5WhcNMTQwNDEwMTkyMTU5WjBF MQswCQYDVQQGEwJVUzETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50 ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB CgKCAQEAvq3sKsHpeduJHimOK+fvQdKsI8z8A05MZyyLp2/R/GE8FjNv+hkVY1WQ LIyTNNQH7CJecE1nbTfo8Y56S7x/rhxC6/DJ8MIulapFPnorq46KU6yRxiM0MQ3N nTJHlHA2ozZta6YBBfVfhHWl1F0IfNbXCLKvGwWWMbCx43OfW6KTkbRnE6gFWKuO fSO5h2u5TaWVuSIzBvYs7Vza6m+gtYAvKAJV2nSZ+eSEFPDo29corOy8+huEOUL8 5FAw4BFPsr1TlrlGPFitduQUHGrSL7skk1ESGza0to3bOtrodKei2s9bk5MXm7lZ qI+WZJX4Zu9+mzZhc9pCVi8r/qlXuQIDAQABo4GnMIGkMB0GA1UdDgQWBBRvavf+ sWM4IwKiH9X9w1vl6nUVRDB1BgNVHSMEbjBsgBRvavf+sWM4IwKiH9X9w1vl6nUV RKFJpEcwRTELMAkGA1UEBhMCVVMxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV BAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAM15n7fdxhRtMAwGA1UdEwQF MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBABY2ZzBaW0dMsAAT7tPJzrVWVzQx6KU4 UEBLudIlWPlkAwTnINCWR/8eNjCCmGA4heUdHmazdpPa8RzwOmc0NT1NQqzSyktt vTqb4iHD7+8f9MqJ9/FssCfTtqr/Qst/hGH4Wmdf1EJ/6FqYAAb5iRlPgshFZxU8 uXtA8hWn6fK6eISD9HBdcAFToUvKNZ1BIDPvh9f95Ine8ar6yGd56TUNrHR8eHBs ESxz5ddVR/oWRysNJ+aGAyYqHS8S/ttmC7r4XCAHqXptkHPCGRqkAhsterYhd4I8 /cBzejUobNCjjHFbtkAL/SjxZOLW+pNkZwfeYdM8iPkD54Uua1v2tdw= -----END CERTIFICATE-----","bundle_method":"ubiquitous"}'
                                                                                      Response (example)
                                                                                      {
                                                                                        "success": true,
                                                                                        "errors": [],
                                                                                        "messages": [],
                                                                                        "result": {
                                                                                          "id": "4d2844d2ce78891c34d0b6c0535a291e",
                                                                                          "name": "example.com Keyless SSL",
                                                                                          "host": "example.com",
                                                                                          "port": 24008,
                                                                                          "status": "active",
                                                                                          "enabled": false,
                                                                                          "permissions": [
                                                                                            "#ssl:read",
                                                                                            "#ssl:edit"
                                                                                          ],
                                                                                          "created_on": "2014-01-01T05:20:00Z",
                                                                                          "modified_on": "2014-01-01T05:20:00Z"
                                                                                        }
                                                                                      }
                                                                                      keyless-ssl-for-a-zone-list-keyless-ssl-configurations

                                                                                      GET List Keyless SSL Configurations permission needed: #ssl:read
                                                                                      • free
                                                                                      • pro
                                                                                      • business
                                                                                      • enterprise

                                                                                      List all Keyless SSL configurations for a given zone

                                                                                      GET zones/:zone_identifier/keyless_certificates
                                                                                      cURL (example)
                                                                                      curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/keyless_certificates" \
                                                                                           -H "X-Auth-Email: [email protected]" \
                                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                           -H "Content-Type: application/json"
                                                                                      Response (example)
                                                                                      {
                                                                                        "success": true,
                                                                                        "errors": [],
                                                                                        "messages": [],
                                                                                        "result": [
                                                                                          {
                                                                                            "id": "4d2844d2ce78891c34d0b6c0535a291e",
                                                                                            "name": "example.com Keyless SSL",
                                                                                            "host": "example.com",
                                                                                            "port": 24008,
                                                                                            "status": "active",
                                                                                            "enabled": false,
                                                                                            "permissions": [
                                                                                              "#ssl:read",
                                                                                              "#ssl:edit"
                                                                                            ],
                                                                                            "created_on": "2014-01-01T05:20:00Z",
                                                                                            "modified_on": "2014-01-01T05:20:00Z"
                                                                                          }
                                                                                        ],
                                                                                        "result_info": {
                                                                                          "page": 1,
                                                                                          "per_page": 20,
                                                                                          "count": 1,
                                                                                          "total_count": 2000
                                                                                        }
                                                                                      }
                                                                                      keyless-ssl-for-a-zone-keyless-ssl-details

                                                                                      GET Keyless SSL details permission needed: #ssl:read
                                                                                      • free
                                                                                      • pro
                                                                                      • business
                                                                                      • enterprise

                                                                                      Details for one Keyless SSL configuration

                                                                                      GET zones/:zone_identifier/keyless_certificates/:identifier
                                                                                      cURL (example)
                                                                                      curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/keyless_certificates/4d2844d2ce78891c34d0b6c0535a291e" \
                                                                                           -H "X-Auth-Email: [email protected]" \
                                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                           -H "Content-Type: application/json"
                                                                                      Response (example)
                                                                                      {
                                                                                        "success": true,
                                                                                        "errors": [],
                                                                                        "messages": [],
                                                                                        "result": {
                                                                                          "id": "4d2844d2ce78891c34d0b6c0535a291e",
                                                                                          "name": "example.com Keyless SSL",
                                                                                          "host": "example.com",
                                                                                          "port": 24008,
                                                                                          "status": "active",
                                                                                          "enabled": false,
                                                                                          "permissions": [
                                                                                            "#ssl:read",
                                                                                            "#ssl:edit"
                                                                                          ],
                                                                                          "created_on": "2014-01-01T05:20:00Z",
                                                                                          "modified_on": "2014-01-01T05:20:00Z"
                                                                                        }
                                                                                      }
                                                                                      keyless-ssl-for-a-zone-update-keyless-configuration

                                                                                      PATCH Update Keyless configuration permission needed: #ssl:edit
                                                                                      • free
                                                                                      • pro
                                                                                      • business
                                                                                      • enterprise

                                                                                      This will update attributes of a Keyless SSL. Consists of one or more of the following: host,name,port,certificate,enabled

                                                                                      PATCH zones/:zone_identifier/keyless_certificates/:identifier

                                                                                      Optional parameters

                                                                                      Name /typeDescription /exampleConstraints
                                                                                      host
                                                                                      string

                                                                                      The keyless SSL name

                                                                                      "example.com"
                                                                                      • max length: 253
                                                                                      • pattern: hostname_or_ip
                                                                                      name
                                                                                      string

                                                                                      The keyless SSL name

                                                                                      "example.com Keyless SSL"
                                                                                      • max length: 180
                                                                                      • read only
                                                                                      port
                                                                                      number

                                                                                      The keyless SSL port used to commmunicate between Cloudflare and the client's Keyless SSL server

                                                                                      24008
                                                                                      • default value: 24008
                                                                                      • max length: 65535
                                                                                      enabled
                                                                                      boolean

                                                                                      Whether or not the Keyless SSL is on or off

                                                                                      false
                                                                                      • valid values: (true,false)
                                                                                      • read only
                                                                                      cURL (example)
                                                                                      curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/keyless_certificates/4d2844d2ce78891c34d0b6c0535a291e" \
                                                                                           -H "X-Auth-Email: [email protected]" \
                                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                           -H "Content-Type: application/json" \
                                                                                           --data '{"host":"example.com","name":"example.com Keyless SSL","port":24008,"enabled":false}'
                                                                                      Response (example)
                                                                                      {
                                                                                        "success": true,
                                                                                        "errors": [],
                                                                                        "messages": [],
                                                                                        "result": {
                                                                                          "id": "4d2844d2ce78891c34d0b6c0535a291e",
                                                                                          "name": "example.com Keyless SSL",
                                                                                          "host": "example.com",
                                                                                          "port": 24008,
                                                                                          "status": "active",
                                                                                          "enabled": false,
                                                                                          "permissions": [
                                                                                            "#ssl:read",
                                                                                            "#ssl:edit"
                                                                                          ],
                                                                                          "created_on": "2014-01-01T05:20:00Z",
                                                                                          "modified_on": "2014-01-01T05:20:00Z"
                                                                                        }
                                                                                      }
                                                                                      keyless-ssl-for-a-zone-delete-keyless-configuration

                                                                                      DELETE Delete Keyless configuration permission needed: #ssl:edit
                                                                                      • free
                                                                                      • pro
                                                                                      • business
                                                                                      • enterprise

                                                                                      DELETE zones/:zone_identifier/keyless_certificates/:identifier
                                                                                      cURL (example)
                                                                                      curl -X DELETE "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/keyless_certificates/4d2844d2ce78891c34d0b6c0535a291e" \
                                                                                           -H "X-Auth-Email: [email protected]" \
                                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                           -H "Content-Type: application/json"
                                                                                      Response (example)
                                                                                      {
                                                                                        "success": true,
                                                                                        "errors": [],
                                                                                        "messages": [],
                                                                                        "result": {
                                                                                          "id": "4d2844d2ce78891c34d0b6c0535a291e"
                                                                                        }
                                                                                      }

                                                                                      Page rules for a Zone

                                                                                      A rule describing target patterns for requests and actions to perform on matching requests

                                                                                      page-rules-for-a-zone

                                                                                      Object definition

                                                                                      View properties and constraints defined on the object

                                                                                      Show definition

                                                                                      page-rules-for-a-zone-create-a-page-rule

                                                                                      POST Create a page rule permission needed: #zone:edit
                                                                                      • free
                                                                                      • pro
                                                                                      • business
                                                                                      • enterprise

                                                                                      POST zones/:zone_identifier/pagerules

                                                                                      Required parameters

                                                                                      Name /typeDescription /exampleConstraints
                                                                                      targets
                                                                                      array

                                                                                      Targets to evaluate on a request

                                                                                      [ { "target": "url", "constraint": { "operator": "matches", "value": "*example.com/images/*" } } ]
                                                                                      An array with items in the following form:
                                                                                        actions
                                                                                        array

                                                                                        The set of actions to perform if the targets of this rule match the request. Actions can redirect the url to another url or override settings (but not both)

                                                                                        [ { "id": "always_online", "value": "on" } ]
                                                                                        An array with items in the following form:

                                                                                          Optional parameters

                                                                                          Name /typeDescription /exampleConstraints
                                                                                          priority
                                                                                          integer

                                                                                          A number that indicates the preference for a page rule over another. In the case where you may have a catch-all page rule (e.g., #1: '/images/') but want a rule that is more specific to take precedence (e.g., #2: '/images/special/'), you'll want to specify a higher priority on the latter (#2) so it will override the first.

                                                                                          1
                                                                                          • default value: 1
                                                                                          status

                                                                                          Status of the page rule

                                                                                          "active"
                                                                                          • default value: disabled
                                                                                          • valid values: active, disabled
                                                                                          cURL (example)
                                                                                          curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules" \
                                                                                               -H "X-Auth-Email: [email protected]" \
                                                                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                               -H "Content-Type: application/json" \
                                                                                               --data '{"targets":[{"target":"url","constraint":{"operator":"matches","value":"*example.com/images/*"}}],"actions":[{"id":"always_online","value":"on"}],"priority":1,"status":"active"}'
                                                                                          Response (example)
                                                                                          {
                                                                                            "success": true,
                                                                                            "errors": [],
                                                                                            "messages": [],
                                                                                            "result": {
                                                                                              "id": "9a7806061c88ada191ed06f989cc3dac",
                                                                                              "targets": [
                                                                                                {
                                                                                                  "target": "url",
                                                                                                  "constraint": {
                                                                                                    "operator": "matches",
                                                                                                    "value": "*example.com/images/*"
                                                                                                  }
                                                                                                }
                                                                                              ],
                                                                                              "actions": [
                                                                                                {
                                                                                                  "id": "always_online",
                                                                                                  "value": "on"
                                                                                                }
                                                                                              ],
                                                                                              "priority": 1,
                                                                                              "status": "active",
                                                                                              "modified_on": "2014-01-01T05:20:00.12345Z",
                                                                                              "created_on": "2014-01-01T05:20:00.12345Z"
                                                                                            }
                                                                                          }
                                                                                          page-rules-for-a-zone-list-page-rules

                                                                                          GET List page rules permission needed: #zone:read
                                                                                          • free
                                                                                          • pro
                                                                                          • business
                                                                                          • enterprise

                                                                                          GET zones/:zone_identifier/pagerules

                                                                                          Optional parameters

                                                                                          Name /typeDescription /exampleConstraints
                                                                                          status

                                                                                          Status of the page rule

                                                                                          "active"
                                                                                          • default value: disabled
                                                                                          • valid values: active, disabled
                                                                                          order

                                                                                          Field to order page rules by

                                                                                          "status"
                                                                                          • default value: priority
                                                                                          • valid values: status, priority
                                                                                          direction

                                                                                          Direction to order page rules

                                                                                          "desc"
                                                                                          • default value: desc
                                                                                          • valid values: asc, desc
                                                                                          match

                                                                                          Whether to match all search requirements or at least one (any)

                                                                                          "all"
                                                                                          • default value: all
                                                                                          • valid values: any, all
                                                                                          cURL (example)
                                                                                          curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules?status=active&order=status&direction=desc&match=all" \
                                                                                               -H "X-Auth-Email: [email protected]" \
                                                                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                               -H "Content-Type: application/json"
                                                                                          Response (example)
                                                                                          {
                                                                                            "success": true,
                                                                                            "errors": [],
                                                                                            "messages": [],
                                                                                            "result": [
                                                                                              {
                                                                                                "id": "9a7806061c88ada191ed06f989cc3dac",
                                                                                                "targets": [
                                                                                                  {
                                                                                                    "target": "url",
                                                                                                    "constraint": {
                                                                                                      "operator": "matches",
                                                                                                      "value": "*example.com/images/*"
                                                                                                    }
                                                                                                  }
                                                                                                ],
                                                                                                "actions": [
                                                                                                  {
                                                                                                    "id": "always_online",
                                                                                                    "value": "on"
                                                                                                  }
                                                                                                ],
                                                                                                "priority": 1,
                                                                                                "status": "active",
                                                                                                "modified_on": "2014-01-01T05:20:00.12345Z",
                                                                                                "created_on": "2014-01-01T05:20:00.12345Z"
                                                                                              }
                                                                                            ],
                                                                                            "result_info": {
                                                                                              "page": 1,
                                                                                              "per_page": 20,
                                                                                              "count": 1,
                                                                                              "total_count": 2000
                                                                                            }
                                                                                          }
                                                                                          page-rules-for-a-zone-page-rule-details

                                                                                          GET Page rule details permission needed: #zone:read
                                                                                          • free
                                                                                          • pro
                                                                                          • business
                                                                                          • enterprise

                                                                                          GET zones/:zone_identifier/pagerules/:identifier
                                                                                          cURL (example)
                                                                                          curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules/9a7806061c88ada191ed06f989cc3dac" \
                                                                                               -H "X-Auth-Email: [email protected]" \
                                                                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                               -H "Content-Type: application/json"
                                                                                          Response (example)
                                                                                          {
                                                                                            "success": true,
                                                                                            "errors": [],
                                                                                            "messages": [],
                                                                                            "result": {
                                                                                              "id": "9a7806061c88ada191ed06f989cc3dac",
                                                                                              "targets": [
                                                                                                {
                                                                                                  "target": "url",
                                                                                                  "constraint": {
                                                                                                    "operator": "matches",
                                                                                                    "value": "*example.com/images/*"
                                                                                                  }
                                                                                                }
                                                                                              ],
                                                                                              "actions": [
                                                                                                {
                                                                                                  "id": "always_online",
                                                                                                  "value": "on"
                                                                                                }
                                                                                              ],
                                                                                              "priority": 1,
                                                                                              "status": "active",
                                                                                              "modified_on": "2014-01-01T05:20:00.12345Z",
                                                                                              "created_on": "2014-01-01T05:20:00.12345Z"
                                                                                            }
                                                                                          }
                                                                                          page-rules-for-a-zone-change-a-page-rule

                                                                                          PATCH Change a page rule permission needed: #zone:edit
                                                                                          • free
                                                                                          • pro
                                                                                          • business
                                                                                          • enterprise

                                                                                          PATCH zones/:zone_identifier/pagerules/:identifier

                                                                                          Optional parameters

                                                                                          Name /typeDescription /exampleConstraints
                                                                                          targets
                                                                                          array

                                                                                          Targets to evaluate on a request

                                                                                          [ { "target": "url", "constraint": { "operator": "matches", "value": "*example.com/images/*" } } ]
                                                                                          An array with items in the following form:
                                                                                            actions
                                                                                            array

                                                                                            The set of actions to perform if the targets of this rule match the request. Actions can redirect the url to another url or override settings (but not both)

                                                                                            [ { "id": "always_online", "value": "on" } ]
                                                                                            An array with items in the following form:
                                                                                              priority
                                                                                              integer

                                                                                              A number that indicates the preference for a page rule over another. In the case where you may have a catch-all page rule (e.g., #1: '/images/') but want a rule that is more specific to take precedence (e.g., #2: '/images/special/'), you'll want to specify a higher priority on the latter (#2) so it will override the first.

                                                                                              1
                                                                                              • default value: 1
                                                                                              status

                                                                                              Status of the page rule

                                                                                              "active"
                                                                                              • default value: disabled
                                                                                              • valid values: active, disabled
                                                                                              cURL (example)
                                                                                              curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules/9a7806061c88ada191ed06f989cc3dac" \
                                                                                                   -H "X-Auth-Email: [email protected]" \
                                                                                                   -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                   -H "Content-Type: application/json" \
                                                                                                   --data '{"targets":[{"target":"url","constraint":{"operator":"matches","value":"*example.com/images/*"}}],"actions":[{"id":"always_online","value":"on"}],"priority":1,"status":"active"}'
                                                                                              Response (example)
                                                                                              {
                                                                                                "success": true,
                                                                                                "errors": [],
                                                                                                "messages": [],
                                                                                                "result": {
                                                                                                  "id": "9a7806061c88ada191ed06f989cc3dac",
                                                                                                  "targets": [
                                                                                                    {
                                                                                                      "target": "url",
                                                                                                      "constraint": {
                                                                                                        "operator": "matches",
                                                                                                        "value": "*example.com/images/*"
                                                                                                      }
                                                                                                    }
                                                                                                  ],
                                                                                                  "actions": [
                                                                                                    {
                                                                                                      "id": "always_online",
                                                                                                      "value": "on"
                                                                                                    }
                                                                                                  ],
                                                                                                  "priority": 1,
                                                                                                  "status": "active",
                                                                                                  "modified_on": "2014-01-01T05:20:00.12345Z",
                                                                                                  "created_on": "2014-01-01T05:20:00.12345Z"
                                                                                                }
                                                                                              }
                                                                                              page-rules-for-a-zone-update-a-page-rule

                                                                                              PUT Update a page rule permission needed: #zone:edit
                                                                                              • free
                                                                                              • pro
                                                                                              • business
                                                                                              • enterprise

                                                                                              Replace a page rule. The final rule will exactly match the data passed with this request.

                                                                                              PUT zones/:zone_identifier/pagerules/:identifier

                                                                                              Required parameters

                                                                                              Name /typeDescription /exampleConstraints
                                                                                              targets
                                                                                              array

                                                                                              Targets to evaluate on a request

                                                                                              [ { "target": "url", "constraint": { "operator": "matches", "value": "*example.com/images/*" } } ]
                                                                                              An array with items in the following form:
                                                                                                actions
                                                                                                array

                                                                                                The set of actions to perform if the targets of this rule match the request. Actions can redirect the url to another url or override settings (but not both)

                                                                                                [ { "id": "always_online", "value": "on" } ]
                                                                                                An array with items in the following form:

                                                                                                  Optional parameters

                                                                                                  Name /typeDescription /exampleConstraints
                                                                                                  priority
                                                                                                  integer

                                                                                                  A number that indicates the preference for a page rule over another. In the case where you may have a catch-all page rule (e.g., #1: '/images/') but want a rule that is more specific to take precedence (e.g., #2: '/images/special/'), you'll want to specify a higher priority on the latter (#2) so it will override the first.

                                                                                                  1
                                                                                                  • default value: 1
                                                                                                  status

                                                                                                  Status of the page rule

                                                                                                  "active"
                                                                                                  • default value: disabled
                                                                                                  • valid values: active, disabled
                                                                                                  cURL (example)
                                                                                                  curl -X PUT "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules/9a7806061c88ada191ed06f989cc3dac" \
                                                                                                       -H "X-Auth-Email: [email protected]" \
                                                                                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                       -H "Content-Type: application/json" \
                                                                                                       --data '{"targets":[{"target":"url","constraint":{"operator":"matches","value":"*example.com/images/*"}}],"actions":[{"id":"always_online","value":"on"}],"priority":1,"status":"active"}'
                                                                                                  Response (example)
                                                                                                  {
                                                                                                    "success": true,
                                                                                                    "errors": [],
                                                                                                    "messages": [],
                                                                                                    "result": {
                                                                                                      "id": "9a7806061c88ada191ed06f989cc3dac",
                                                                                                      "targets": [
                                                                                                        {
                                                                                                          "target": "url",
                                                                                                          "constraint": {
                                                                                                            "operator": "matches",
                                                                                                            "value": "*example.com/images/*"
                                                                                                          }
                                                                                                        }
                                                                                                      ],
                                                                                                      "actions": [
                                                                                                        {
                                                                                                          "id": "always_online",
                                                                                                          "value": "on"
                                                                                                        }
                                                                                                      ],
                                                                                                      "priority": 1,
                                                                                                      "status": "active",
                                                                                                      "modified_on": "2014-01-01T05:20:00.12345Z",
                                                                                                      "created_on": "2014-01-01T05:20:00.12345Z"
                                                                                                    }
                                                                                                  }
                                                                                                  page-rules-for-a-zone-delete-a-page-rule

                                                                                                  DELETE Delete a page rule permission needed: #zone:edit
                                                                                                  • free
                                                                                                  • pro
                                                                                                  • business
                                                                                                  • enterprise

                                                                                                  DELETE zones/:zone_identifier/pagerules/:identifier
                                                                                                  cURL (example)
                                                                                                  curl -X DELETE "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/pagerules/9a7806061c88ada191ed06f989cc3dac" \
                                                                                                       -H "X-Auth-Email: [email protected]" \
                                                                                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                       -H "Content-Type: application/json"
                                                                                                  Response (example)
                                                                                                  {
                                                                                                    "success": true,
                                                                                                    "errors": [],
                                                                                                    "messages": [],
                                                                                                    "result": {
                                                                                                      "id": "9a7806061c88ada191ed06f989cc3dac"
                                                                                                    }
                                                                                                  }

                                                                                                  Rate Limits for a Zone

                                                                                                  Documentation for Cloudflare Rate Limits

                                                                                                  rate-limits-for-a-zone

                                                                                                  Object definition

                                                                                                  View properties and constraints defined on the object

                                                                                                  Show definition

                                                                                                  rate-limits-for-a-zone-list-rate-limits

                                                                                                  GET List rate limits
                                                                                                  • free
                                                                                                  • pro
                                                                                                  • business
                                                                                                  • enterprise

                                                                                                  List the rate limits on a zone.

                                                                                                  GET zones/:zone_identifier/rate_limits

                                                                                                  Optional parameters

                                                                                                  Name /typeDescription /exampleConstraints
                                                                                                  page
                                                                                                  number

                                                                                                  Page number of paginated results

                                                                                                  1
                                                                                                  • default value: 1
                                                                                                  • min value:1
                                                                                                  per_page
                                                                                                  number

                                                                                                  Number of rate limits per page

                                                                                                  20
                                                                                                  • default value: 20
                                                                                                  • min value:5
                                                                                                  • max value:100
                                                                                                  cURL (example)
                                                                                                  curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/rate_limits?page=1&per_page=20" \
                                                                                                       -H "X-Auth-Email: [email protected]" \
                                                                                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                       -H "Content-Type: application/json"
                                                                                                  Response (example)
                                                                                                  {
                                                                                                    "success": true,
                                                                                                    "errors": [],
                                                                                                    "messages": [],
                                                                                                    "result": [
                                                                                                      {
                                                                                                        "id": "372e67954025e0ba6aaa6d586b9e0b59",
                                                                                                        "disabled": false,
                                                                                                        "description": "Prevent multiple login failures to mitigate brute force attacks",
                                                                                                        "match": {
                                                                                                          "request": {
                                                                                                            "methods": [
                                                                                                              "GET",
                                                                                                              "POST"
                                                                                                            ],
                                                                                                            "schemes": [
                                                                                                              "HTTP",
                                                                                                              "HTTPS"
                                                                                                            ],
                                                                                                            "url": "*.example.org/path*"
                                                                                                          },
                                                                                                          "response": {
                                                                                                            "status": [
                                                                                                              401,
                                                                                                              403
                                                                                                            ],
                                                                                                            "origin_traffic": true
                                                                                                          }
                                                                                                        },
                                                                                                        "bypass": [
                                                                                                          {
                                                                                                            "name": "url",
                                                                                                            "value": "api.example.com/*"
                                                                                                          }
                                                                                                        ],
                                                                                                        "threshold": 60,
                                                                                                        "period": 900,
                                                                                                        "action": {
                                                                                                          "mode": "simulate",
                                                                                                          "timeout": 86400,
                                                                                                          "response": {
                                                                                                            "content_type": "text/xml",
                                                                                                            "body": "<error>This request has been rate-limited.</error>"
                                                                                                          }
                                                                                                        }
                                                                                                      }
                                                                                                    ],
                                                                                                    "result_info": {
                                                                                                      "page": 1,
                                                                                                      "per_page": 20,
                                                                                                      "count": 1,
                                                                                                      "total_count": 2000
                                                                                                    }
                                                                                                  }
                                                                                                  rate-limits-for-a-zone-create-a-ratelimit

                                                                                                  POST Create a ratelimit
                                                                                                  • free
                                                                                                  • pro
                                                                                                  • business
                                                                                                  • enterprise

                                                                                                  Create a new rate limit for a zone. See the record object definitions for required attributes for each record type

                                                                                                  POST zones/:zone_identifier/rate_limits

                                                                                                  Required parameters

                                                                                                  Name /typeDescription /exampleConstraints
                                                                                                  match
                                                                                                  object

                                                                                                  Determines which traffic the rate limit counts towards the threshold

                                                                                                  { "request": { "methods": [ "GET", "POST" ], "schemes": [ "HTTP", "HTTPS" ], "url": "*.example.org/path*" }, "response": { "status": [ 401, 403 ], "origin_traffic": true } }
                                                                                                  One of the following:
                                                                                                    threshold
                                                                                                    number

                                                                                                    The threshold that triggers the rate limit mitigations, combine with period. i.e. threshold per period

                                                                                                    60
                                                                                                    • min value:2
                                                                                                    • max value:1000000
                                                                                                    period
                                                                                                    number

                                                                                                    The time in seconds to count matching traffic. If the count exceeds threshold within this period the action will be performed

                                                                                                    900
                                                                                                    • min value:1
                                                                                                    • max value:86400
                                                                                                    action
                                                                                                    object

                                                                                                    The action to be performed when the threshold of matched traffic within the period defined is exceeded

                                                                                                    { "mode": "simulate", "timeout": 86400, "response": { "content_type": "text/xml", "body": "<error>This request has been rate-limited.</error>" } }
                                                                                                    Any of the following:

                                                                                                      Optional parameters

                                                                                                      Name /typeDescription /exampleConstraints
                                                                                                      id
                                                                                                      string

                                                                                                      Ratelimit identifier

                                                                                                      "372e67954025e0ba6aaa6d586b9e0b59"
                                                                                                      • max length: 32
                                                                                                      • read only
                                                                                                      disabled
                                                                                                      boolean

                                                                                                      Whether this ratelimit is currently disabled

                                                                                                      false
                                                                                                      • valid values: (true,false)
                                                                                                      description
                                                                                                      string

                                                                                                      A note that you can use to describe the reason for a rate limit. This value is sanitized and all tags are removed

                                                                                                      "Prevent multiple login failures to mitigate brute force attacks"
                                                                                                      • max length: 1024
                                                                                                      bypass
                                                                                                      array

                                                                                                      Criteria that would allow the rate limit to be bypassed, for example to express that you shouldn't apply a rate limit to a given set of URLs

                                                                                                      [ { "name": "url", "value": "api.example.com/*" } ]
                                                                                                      An array with items in the following form:
                                                                                                        cURL (example)
                                                                                                        curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/rate_limits" \
                                                                                                             -H "X-Auth-Email: [email protected]" \
                                                                                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                             -H "Content-Type: application/json" \
                                                                                                             --data '{"id":"372e67954025e0ba6aaa6d586b9e0b59","disabled":false,"description":"Prevent multiple login failures to mitigate brute force attacks","match":{"request":{"methods":["GET","POST"],"schemes":["HTTP","HTTPS"],"url":"*.example.org/path*"},"response":{"status":[401,403],"origin_traffic":true}},"bypass":[{"name":"url","value":"api.example.com/*"}],"threshold":60,"period":900,"action":{"mode":"simulate","timeout":86400,"response":{"content_type":"text/xml","body":"<error>This request has been rate-limited.</error>"}}}'
                                                                                                        Response (example)
                                                                                                        {
                                                                                                          "success": true,
                                                                                                          "errors": [],
                                                                                                          "messages": [],
                                                                                                          "result": {
                                                                                                            "id": "372e67954025e0ba6aaa6d586b9e0b59",
                                                                                                            "disabled": false,
                                                                                                            "description": "Prevent multiple login failures to mitigate brute force attacks",
                                                                                                            "match": {
                                                                                                              "request": {
                                                                                                                "methods": [
                                                                                                                  "GET",
                                                                                                                  "POST"
                                                                                                                ],
                                                                                                                "schemes": [
                                                                                                                  "HTTP",
                                                                                                                  "HTTPS"
                                                                                                                ],
                                                                                                                "url": "*.example.org/path*"
                                                                                                              },
                                                                                                              "response": {
                                                                                                                "status": [
                                                                                                                  401,
                                                                                                                  403
                                                                                                                ],
                                                                                                                "origin_traffic": true
                                                                                                              }
                                                                                                            },
                                                                                                            "bypass": [
                                                                                                              {
                                                                                                                "name": "url",
                                                                                                                "value": "api.example.com/*"
                                                                                                              }
                                                                                                            ],
                                                                                                            "threshold": 60,
                                                                                                            "period": 900,
                                                                                                            "action": {
                                                                                                              "mode": "simulate",
                                                                                                              "timeout": 86400,
                                                                                                              "response": {
                                                                                                                "content_type": "text/xml",
                                                                                                                "body": "<error>This request has been rate-limited.</error>"
                                                                                                              }
                                                                                                            }
                                                                                                          }
                                                                                                        }
                                                                                                        rate-limits-for-a-zone-rate-limit-details

                                                                                                        GET Rate limit details
                                                                                                        • free
                                                                                                        • pro
                                                                                                        • business
                                                                                                        • enterprise

                                                                                                        GET zones/:zone_identifier/rate_limits/:id
                                                                                                        cURL (example)
                                                                                                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/rate_limits/372e67954025e0ba6aaa6d586b9e0b59" \
                                                                                                             -H "X-Auth-Email: [email protected]" \
                                                                                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                             -H "Content-Type: application/json"
                                                                                                        Response (example)
                                                                                                        {
                                                                                                          "success": true,
                                                                                                          "errors": [],
                                                                                                          "messages": [],
                                                                                                          "result": {
                                                                                                            "id": "372e67954025e0ba6aaa6d586b9e0b59",
                                                                                                            "disabled": false,
                                                                                                            "description": "Prevent multiple login failures to mitigate brute force attacks",
                                                                                                            "match": {
                                                                                                              "request": {
                                                                                                                "methods": [
                                                                                                                  "GET",
                                                                                                                  "POST"
                                                                                                                ],
                                                                                                                "schemes": [
                                                                                                                  "HTTP",
                                                                                                                  "HTTPS"
                                                                                                                ],
                                                                                                                "url": "*.example.org/path*"
                                                                                                              },
                                                                                                              "response": {
                                                                                                                "status": [
                                                                                                                  401,
                                                                                                                  403
                                                                                                                ],
                                                                                                                "origin_traffic": true
                                                                                                              }
                                                                                                            },
                                                                                                            "bypass": [
                                                                                                              {
                                                                                                                "name": "url",
                                                                                                                "value": "api.example.com/*"
                                                                                                              }
                                                                                                            ],
                                                                                                            "threshold": 60,
                                                                                                            "period": 900,
                                                                                                            "action": {
                                                                                                              "mode": "simulate",
                                                                                                              "timeout": 86400,
                                                                                                              "response": {
                                                                                                                "content_type": "text/xml",
                                                                                                                "body": "<error>This request has been rate-limited.</error>"
                                                                                                              }
                                                                                                            }
                                                                                                          }
                                                                                                        }
                                                                                                        rate-limits-for-a-zone-update-rate-limit

                                                                                                        PUT Update rate limit
                                                                                                        • free
                                                                                                        • pro
                                                                                                        • business
                                                                                                        • enterprise

                                                                                                        PUT zones/:zone_identifier/rate_limits/:id

                                                                                                        Required parameters

                                                                                                        Name /typeDescription /exampleConstraints
                                                                                                        id
                                                                                                        string

                                                                                                        Ratelimit identifier

                                                                                                        "372e67954025e0ba6aaa6d586b9e0b59"
                                                                                                        • max length: 32
                                                                                                        • read only
                                                                                                        match
                                                                                                        object

                                                                                                        Determines which traffic the rate limit counts towards the threshold

                                                                                                        { "request": { "methods": [ "GET", "POST" ], "schemes": [ "HTTP", "HTTPS" ], "url": "*.example.org/path*" }, "response": { "status": [ 401, 403 ], "origin_traffic": true } }
                                                                                                        One of the following:
                                                                                                          threshold
                                                                                                          number

                                                                                                          The threshold that triggers the rate limit mitigations, combine with period. i.e. threshold per period

                                                                                                          60
                                                                                                          • min value:2
                                                                                                          • max value:1000000
                                                                                                          period
                                                                                                          number

                                                                                                          The time in seconds to count matching traffic. If the count exceeds threshold within this period the action will be performed

                                                                                                          900
                                                                                                          • min value:1
                                                                                                          • max value:86400
                                                                                                          action
                                                                                                          object

                                                                                                          The action to be performed when the threshold of matched traffic within the period defined is exceeded

                                                                                                          { "mode": "simulate", "timeout": 86400, "response": { "content_type": "text/xml", "body": "<error>This request has been rate-limited.</error>" } }
                                                                                                          Any of the following:

                                                                                                            Optional parameters

                                                                                                            Name /typeDescription /exampleConstraints
                                                                                                            disabled
                                                                                                            boolean

                                                                                                            Whether this ratelimit is currently disabled

                                                                                                            false
                                                                                                            • valid values: (true,false)
                                                                                                            description
                                                                                                            string

                                                                                                            A note that you can use to describe the reason for a rate limit. This value is sanitized and all tags are removed

                                                                                                            "Prevent multiple login failures to mitigate brute force attacks"
                                                                                                            • max length: 1024
                                                                                                            bypass
                                                                                                            array

                                                                                                            Criteria that would allow the rate limit to be bypassed, for example to express that you shouldn't apply a rate limit to a given set of URLs

                                                                                                            [ { "name": "url", "value": "api.example.com/*" } ]
                                                                                                            An array with items in the following form:
                                                                                                              cURL (example)
                                                                                                              curl -X PUT "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/rate_limits/372e67954025e0ba6aaa6d586b9e0b59" \
                                                                                                                   -H "X-Auth-Email: [email protected]" \
                                                                                                                   -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                   -H "Content-Type: application/json" \
                                                                                                                   --data '{"id":"372e67954025e0ba6aaa6d586b9e0b59","disabled":false,"description":"Prevent multiple login failures to mitigate brute force attacks","match":{"request":{"methods":["GET","POST"],"schemes":["HTTP","HTTPS"],"url":"*.example.org/path*"},"response":{"status":[401,403],"origin_traffic":true}},"bypass":[{"name":"url","value":"api.example.com/*"}],"threshold":60,"period":900,"action":{"mode":"simulate","timeout":86400,"response":{"content_type":"text/xml","body":"<error>This request has been rate-limited.</error>"}}}'
                                                                                                              Response (example)
                                                                                                              {
                                                                                                                "success": true,
                                                                                                                "errors": [],
                                                                                                                "messages": [],
                                                                                                                "result": {
                                                                                                                  "id": "372e67954025e0ba6aaa6d586b9e0b59",
                                                                                                                  "disabled": false,
                                                                                                                  "description": "Prevent multiple login failures to mitigate brute force attacks",
                                                                                                                  "match": {
                                                                                                                    "request": {
                                                                                                                      "methods": [
                                                                                                                        "GET",
                                                                                                                        "POST"
                                                                                                                      ],
                                                                                                                      "schemes": [
                                                                                                                        "HTTP",
                                                                                                                        "HTTPS"
                                                                                                                      ],
                                                                                                                      "url": "*.example.org/path*"
                                                                                                                    },
                                                                                                                    "response": {
                                                                                                                      "status": [
                                                                                                                        401,
                                                                                                                        403
                                                                                                                      ],
                                                                                                                      "origin_traffic": true
                                                                                                                    }
                                                                                                                  },
                                                                                                                  "bypass": [
                                                                                                                    {
                                                                                                                      "name": "url",
                                                                                                                      "value": "api.example.com/*"
                                                                                                                    }
                                                                                                                  ],
                                                                                                                  "threshold": 60,
                                                                                                                  "period": 900,
                                                                                                                  "action": {
                                                                                                                    "mode": "simulate",
                                                                                                                    "timeout": 86400,
                                                                                                                    "response": {
                                                                                                                      "content_type": "text/xml",
                                                                                                                      "body": "<error>This request has been rate-limited.</error>"
                                                                                                                    }
                                                                                                                  }
                                                                                                                }
                                                                                                              }
                                                                                                              rate-limits-for-a-zone-delete-rate-limit

                                                                                                              DELETE Delete rate limit
                                                                                                              • free
                                                                                                              • pro
                                                                                                              • business
                                                                                                              • enterprise

                                                                                                              DELETE zones/:zone_identifier/rate_limits/:id
                                                                                                              cURL (example)
                                                                                                              curl -X DELETE "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/rate_limits/372e67954025e0ba6aaa6d586b9e0b59" \
                                                                                                                   -H "X-Auth-Email: [email protected]" \
                                                                                                                   -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                   -H "Content-Type: application/json"
                                                                                                              Response (example)
                                                                                                              {
                                                                                                                "success": true,
                                                                                                                "errors": [],
                                                                                                                "messages": [],
                                                                                                                "result": {
                                                                                                                  "id": "372e67954025e0ba6aaa6d586b9e0b59"
                                                                                                                }
                                                                                                              }

                                                                                                              Rate Limits for a Zone error codes

                                                                                                              CodeDescription
                                                                                                              10010Time param not valid
                                                                                                              10000Invalid user
                                                                                                              10011Pagination results in empty page
                                                                                                              10001Rate limit not found
                                                                                                              10012URL Param incorrect format
                                                                                                              10002Rate limit not unique (edit the existing rather than adding a new)
                                                                                                              10013Patch values not valid
                                                                                                              10014Patch operation not valid
                                                                                                              10004Invalid data submitted
                                                                                                              10015Patch value not valid for given context
                                                                                                              10016Patch not valid
                                                                                                              10006Auth missing
                                                                                                              10007Auth corrupt
                                                                                                              10008Auth expired
                                                                                                              10009Unauthorized

                                                                                                              Firewall access rule for a Zone

                                                                                                              An IP, IP range, or country specific firewall rule applied directly to a zone or inherited from user or organization-level rules.

                                                                                                              Access Rules are a way to allow, challenge, or block requests to your website based on the IP address, IP address range, or country of the browser making the request.

                                                                                                              You can apply Access Rules to one zone only or all zones in your account. See the User-level or Organization-level access rules endpoints for creating rules that are applied across all zones owned by the user or organization.

                                                                                                              firewall-access-rule-for-a-zone

                                                                                                              Object definition

                                                                                                              View properties and constraints defined on the object

                                                                                                              Show definition

                                                                                                              firewall-access-rule-for-a-zone-list-access-rules

                                                                                                              GET List access rules
                                                                                                              • free
                                                                                                              • pro
                                                                                                              • business
                                                                                                              • enterprise

                                                                                                              Search, sort, and filter IP/country access rules

                                                                                                              GET zones/:zone_id/firewall/access_rules/rules

                                                                                                              Optional parameters

                                                                                                              Name /typeDescription /exampleConstraints
                                                                                                              notes
                                                                                                              string

                                                                                                              Search in the access rules by notes.

                                                                                                              "my note"
                                                                                                              • notes: Matching any string within previously created access rules with the notes. For example, access rules with notes 'Attack 26/02' & 'Attack 27/02' would both match string 'attack'. Search is not case sensitive.
                                                                                                              mode

                                                                                                              The action to apply to a matched request

                                                                                                              "challenge"
                                                                                                              • valid values: block, challenge, whitelist, js_challenge
                                                                                                              match

                                                                                                              Whether to match all search requirements or at least one (any)

                                                                                                              "all"
                                                                                                              • default value: all
                                                                                                              • valid values: any, all
                                                                                                              configuration.target
                                                                                                              string

                                                                                                              Search rules by target

                                                                                                              "ip"
                                                                                                              • valid values: ip, ip_range, asn, country
                                                                                                              order

                                                                                                              Field to order rules by

                                                                                                              "mode"
                                                                                                              • valid values: configuration.target, configuration.value, mode
                                                                                                              page
                                                                                                              number

                                                                                                              Requested page within paginated list of results

                                                                                                              1
                                                                                                                per_page
                                                                                                                number

                                                                                                                Maximum number of results requested

                                                                                                                20
                                                                                                                  configuration.value
                                                                                                                  string

                                                                                                                  Search by IP, range, or country code

                                                                                                                  "1.2.3.4"
                                                                                                                  • notes: IP is a single IPv4 address. IP range has a subnet of /16 or /24. Country code is an ISO 2-letter country code.
                                                                                                                  direction

                                                                                                                  Direction to order rules

                                                                                                                  "desc"
                                                                                                                  • valid values: asc, desc
                                                                                                                  cURL (example)
                                                                                                                  curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/access_rules/rules?page=1&per_page=20&mode=challenge&configuration.target=ip&configuration.value=1.2.3.4&notes=my note&match=all&order=mode&direction=desc" \
                                                                                                                       -H "X-Auth-Email: [email protected]" \
                                                                                                                       -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                       -H "Content-Type: application/json"
                                                                                                                  Response (example)
                                                                                                                  {
                                                                                                                    "success": true,
                                                                                                                    "errors": [],
                                                                                                                    "messages": [],
                                                                                                                    "result": [
                                                                                                                      {
                                                                                                                        "id": "92f17202ed8bd63d69a66b86a49a8f6b",
                                                                                                                        "notes": "This rule is on because of an event that occured on date X",
                                                                                                                        "allowed_modes": [
                                                                                                                          "whitelist",
                                                                                                                          "block",
                                                                                                                          "challenge",
                                                                                                                          "js_challenge"
                                                                                                                        ],
                                                                                                                        "mode": "challenge",
                                                                                                                        "configuration": {
                                                                                                                          "target": "ip",
                                                                                                                          "value": "1.2.3.4"
                                                                                                                        },
                                                                                                                        "created_on": "2014-01-01T05:20:00.12345Z",
                                                                                                                        "modified_on": "2014-01-01T05:20:00.12345Z",
                                                                                                                        "scope": {
                                                                                                                          "id": "7c5dae5552338874e5053f2534d2767a",
                                                                                                                          "email": "[email protected]",
                                                                                                                          "type": "user"
                                                                                                                        }
                                                                                                                      }
                                                                                                                    ],
                                                                                                                    "result_info": {
                                                                                                                      "page": 1,
                                                                                                                      "per_page": 20,
                                                                                                                      "count": 1,
                                                                                                                      "total_count": 2000
                                                                                                                    }
                                                                                                                  }
                                                                                                                  firewall-access-rule-for-a-zone-create-access-rule

                                                                                                                  POST Create access rule
                                                                                                                  • free
                                                                                                                  • pro
                                                                                                                  • business
                                                                                                                  • enterprise

                                                                                                                  Make a new IP, IP range, or country access rule for the zone. Note: If you would like to create an access rule that applies across all of your owned zones, use the user or organization firewall endpoints as appropriate.

                                                                                                                  POST zones/:zone_id/firewall/access_rules/rules

                                                                                                                  Required parameters

                                                                                                                  Name /typeDescription /exampleConstraints
                                                                                                                  mode

                                                                                                                  The action to apply to a matched request

                                                                                                                  "challenge"
                                                                                                                  • valid values: block, challenge, whitelist, js_challenge
                                                                                                                  configuration
                                                                                                                  object

                                                                                                                  Rule configuration

                                                                                                                  { "target": "ip", "value": "1.2.3.4" }
                                                                                                                  One of the following:
                                                                                                                    notes
                                                                                                                    string

                                                                                                                    A personal note about the rule. Typically used as a reminder or explanation for the rule.

                                                                                                                    "This rule is on because of an event that occured on date X"
                                                                                                                      cURL (example)
                                                                                                                      curl -X POST "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/access_rules/rules" \
                                                                                                                           -H "X-Auth-Email: [email protected]" \
                                                                                                                           -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                           -H "Content-Type: application/json" \
                                                                                                                           --data '{"mode":"challenge","configuration":{"target":"ip","value":"1.2.3.4"},"notes":"This rule is on because of an event that occured on date X"}'
                                                                                                                      Response (example)
                                                                                                                      {
                                                                                                                        "success": true,
                                                                                                                        "errors": [],
                                                                                                                        "messages": [],
                                                                                                                        "result": {
                                                                                                                          "id": "92f17202ed8bd63d69a66b86a49a8f6b",
                                                                                                                          "notes": "This rule is on because of an event that occured on date X",
                                                                                                                          "allowed_modes": [
                                                                                                                            "whitelist",
                                                                                                                            "block",
                                                                                                                            "challenge",
                                                                                                                            "js_challenge"
                                                                                                                          ],
                                                                                                                          "mode": "challenge",
                                                                                                                          "configuration": {
                                                                                                                            "target": "ip",
                                                                                                                            "value": "1.2.3.4"
                                                                                                                          },
                                                                                                                          "created_on": "2014-01-01T05:20:00.12345Z",
                                                                                                                          "modified_on": "2014-01-01T05:20:00.12345Z",
                                                                                                                          "scope": {
                                                                                                                            "id": "7c5dae5552338874e5053f2534d2767a",
                                                                                                                            "email": "[email protected]",
                                                                                                                            "type": "user"
                                                                                                                          }
                                                                                                                        }
                                                                                                                      }
                                                                                                                      firewall-access-rule-for-a-zone-update-access-rule

                                                                                                                      PATCH Update access rule
                                                                                                                      • free
                                                                                                                      • pro
                                                                                                                      • business
                                                                                                                      • enterprise

                                                                                                                      Update rule state and/or note for the zone. Note: you can only edit rules in the 'zone' group via this endpoint. Use the appropriate owner rules endpoint if trying to manage owner-level rules

                                                                                                                      PATCH zones/:zone_id/firewall/access_rules/rules/:identifier

                                                                                                                      Optional parameters

                                                                                                                      Name /typeDescription /exampleConstraints
                                                                                                                      mode

                                                                                                                      The action to apply to a matched request

                                                                                                                      "challenge"
                                                                                                                      • valid values: block, challenge, whitelist, js_challenge
                                                                                                                      notes
                                                                                                                      string

                                                                                                                      A personal note about the rule. Typically used as a reminder or explanation for the rule.

                                                                                                                      "This rule is on because of an event that occured on date X"
                                                                                                                        cURL (example)
                                                                                                                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/access_rules/rules/92f17202ed8bd63d69a66b86a49a8f6b" \
                                                                                                                             -H "X-Auth-Email: [email protected]" \
                                                                                                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                             -H "Content-Type: application/json" \
                                                                                                                             --data '{"mode":"challenge","notes":"This rule is on because of an event that occured on date X"}'
                                                                                                                        Response (example)
                                                                                                                        {
                                                                                                                          "success": true,
                                                                                                                          "errors": [],
                                                                                                                          "messages": [],
                                                                                                                          "result": {
                                                                                                                            "id": "92f17202ed8bd63d69a66b86a49a8f6b",
                                                                                                                            "notes": "This rule is on because of an event that occured on date X",
                                                                                                                            "allowed_modes": [
                                                                                                                              "whitelist",
                                                                                                                              "block",
                                                                                                                              "challenge",
                                                                                                                              "js_challenge"
                                                                                                                            ],
                                                                                                                            "mode": "challenge",
                                                                                                                            "configuration": {
                                                                                                                              "target": "ip",
                                                                                                                              "value": "1.2.3.4"
                                                                                                                            },
                                                                                                                            "created_on": "2014-01-01T05:20:00.12345Z",
                                                                                                                            "modified_on": "2014-01-01T05:20:00.12345Z",
                                                                                                                            "scope": {
                                                                                                                              "id": "7c5dae5552338874e5053f2534d2767a",
                                                                                                                              "email": "[email protected]",
                                                                                                                              "type": "user"
                                                                                                                            }
                                                                                                                          }
                                                                                                                        }
                                                                                                                        firewall-access-rule-for-a-zone-delete-access-rule

                                                                                                                        DELETE Delete access rule
                                                                                                                        • free
                                                                                                                        • pro
                                                                                                                        • business
                                                                                                                        • enterprise

                                                                                                                        Remove an access rule so it is no longer evaluated during requests. Optionally, specify how to delete rules that match the mode and configuration across all other zones that this zone owner manages. 'none' is the default, and will only delete this rule. 'basic' will delete rules that match the same mode and configuration. 'aggressive' will delete rules that match the same configuration.

                                                                                                                        DELETE zones/:zone_id/firewall/access_rules/rules/:identifier

                                                                                                                        Optional parameters

                                                                                                                        Name /typeDescription /exampleConstraints
                                                                                                                        cascade

                                                                                                                        The level to attempt to delete rules defined on other zones that are similar to this rule

                                                                                                                        "none"
                                                                                                                        • default value: none
                                                                                                                        • valid values: none, basic, aggressive
                                                                                                                        cURL (example)
                                                                                                                        curl -X DELETE "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/access_rules/rules/92f17202ed8bd63d69a66b86a49a8f6b" \
                                                                                                                             -H "X-Auth-Email: [email protected]" \
                                                                                                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                             -H "Content-Type: application/json" \
                                                                                                                             --data '{"cascade":"none"}'
                                                                                                                        Response (example)
                                                                                                                        {
                                                                                                                          "success": true,
                                                                                                                          "errors": [],
                                                                                                                          "messages": [],
                                                                                                                          "result": {
                                                                                                                            "id": "92f17202ed8bd63d69a66b86a49a8f6b"
                                                                                                                          }
                                                                                                                        }

                                                                                                                        WAF Rule Packages

                                                                                                                        Web application firewall rule package applied to a zone

                                                                                                                        Web application firewall rule packages are collections of rule groups.

                                                                                                                        waf-rule-packages

                                                                                                                        Object definitions

                                                                                                                        View properties and constraints defined on the object

                                                                                                                        Show definitions

                                                                                                                        waf-rule-packages-list-firewall-packages

                                                                                                                        GET List firewall packages
                                                                                                                        • free
                                                                                                                        • pro
                                                                                                                        • business
                                                                                                                        • enterprise

                                                                                                                        Retrieve firewall packages for a zone

                                                                                                                        GET zones/:zone_identifier/firewall/waf/packages

                                                                                                                        Optional parameters

                                                                                                                        Name /typeDescription /exampleConstraints
                                                                                                                        name
                                                                                                                        string

                                                                                                                        Name of the firewall package

                                                                                                                        "WordPress rules"
                                                                                                                        • read only
                                                                                                                        page
                                                                                                                        number

                                                                                                                        Page number of paginated results

                                                                                                                        1
                                                                                                                        • default value: 1
                                                                                                                        • min value:1
                                                                                                                        per_page
                                                                                                                        number

                                                                                                                        Number of packages per page

                                                                                                                        50
                                                                                                                        • default value: 50
                                                                                                                        • min value:5
                                                                                                                        • max value:100
                                                                                                                        order

                                                                                                                        Field to order packages by

                                                                                                                        "status"
                                                                                                                        • valid values: name
                                                                                                                        direction

                                                                                                                        Direction to order packages

                                                                                                                        "desc"
                                                                                                                        • valid values: asc, desc
                                                                                                                        match

                                                                                                                        Whether to match all search requirements or at least one (any)

                                                                                                                        "all"
                                                                                                                        • default value: all
                                                                                                                        • valid values: any, all
                                                                                                                        cURL (example)
                                                                                                                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages?name=WordPress rules&page=1&per_page=50&order=status&direction=desc&match=all" \
                                                                                                                             -H "X-Auth-Email: [email protected]" \
                                                                                                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                             -H "Content-Type: application/json"
                                                                                                                        Response (example)
                                                                                                                        {
                                                                                                                          "success": true,
                                                                                                                          "errors": [],
                                                                                                                          "messages": [],
                                                                                                                          "result": [
                                                                                                                            {
                                                                                                                              "id": "a25a9a7e9c00afc1fb2e0245519d725b",
                                                                                                                              "name": "WordPress rules",
                                                                                                                              "description": "Common WordPress exploit protections",
                                                                                                                              "detection_mode": "traditional",
                                                                                                                              "zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
                                                                                                                              "status": "active"
                                                                                                                            }
                                                                                                                          ],
                                                                                                                          "result_info": {
                                                                                                                            "page": 1,
                                                                                                                            "per_page": 20,
                                                                                                                            "count": 1,
                                                                                                                            "total_count": 2000
                                                                                                                          }
                                                                                                                        }
                                                                                                                        waf-rule-packages-firewall-package-info

                                                                                                                        GET Firewall package info
                                                                                                                        • free
                                                                                                                        • pro
                                                                                                                        • business
                                                                                                                        • enterprise

                                                                                                                        Get information about a single firewall package

                                                                                                                        GET zones/:zone_identifier/firewall/waf/packages/:identifier
                                                                                                                        cURL (example)
                                                                                                                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages/a25a9a7e9c00afc1fb2e0245519d725b" \
                                                                                                                             -H "X-Auth-Email: [email protected]" \
                                                                                                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                             -H "Content-Type: application/json"
                                                                                                                        Response (example)
                                                                                                                        {
                                                                                                                          "success": true,
                                                                                                                          "errors": [],
                                                                                                                          "messages": [],
                                                                                                                          "result": {
                                                                                                                            "id": "a25a9a7e9c00afc1fb2e0245519d725b",
                                                                                                                            "name": "WordPress rules",
                                                                                                                            "description": "Common WordPress exploit protections",
                                                                                                                            "detection_mode": "traditional",
                                                                                                                            "zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
                                                                                                                            "status": "active"
                                                                                                                          }
                                                                                                                        }
                                                                                                                        waf-rule-packages-change-anomaly-detection-web-application-firewall-package-settings

                                                                                                                        PATCH Change anomaly-detection web application firewall package settings
                                                                                                                        • free
                                                                                                                        • pro
                                                                                                                        • business
                                                                                                                        • enterprise

                                                                                                                        Change the sensitivity and action for an anomaly detection type WAF rule package

                                                                                                                        PATCH zones/:zone_identifier/firewall/waf/packages/:identifier

                                                                                                                        Optional parameters

                                                                                                                        Name /typeDescription /exampleConstraints
                                                                                                                        sensitivity

                                                                                                                        The sensitivity of the firewall package.

                                                                                                                        "high"
                                                                                                                        • default value: high
                                                                                                                        • valid values: high, low, off
                                                                                                                        action_mode

                                                                                                                        The default action that will be taken for rules under the firewall package.

                                                                                                                        "challenge"
                                                                                                                        • default value: challenge
                                                                                                                        • valid values: simulate, block, challenge
                                                                                                                        cURL (example)
                                                                                                                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages/a25a9a7e9c00afc1fb2e0245519d725b" \
                                                                                                                             -H "X-Auth-Email: [email protected]" \
                                                                                                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                             -H "Content-Type: application/json" \
                                                                                                                             --data '{"sensitivity":"high","action_mode":"challenge"}'
                                                                                                                        Response (example)
                                                                                                                        {
                                                                                                                          "success": true,
                                                                                                                          "errors": [],
                                                                                                                          "messages": [],
                                                                                                                          "result": {
                                                                                                                            "id": "a25a9a7e9c00afc1fb2e0245519d725b",
                                                                                                                            "name": "WordPress rules",
                                                                                                                            "description": "Common WordPress exploit protections",
                                                                                                                            "detection_mode": "anomaly",
                                                                                                                            "zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
                                                                                                                            "status": "active",
                                                                                                                            "sensitivity": "high",
                                                                                                                            "action_mode": "challenge"
                                                                                                                          }
                                                                                                                        }

                                                                                                                        WAF Rule Groups

                                                                                                                        A group of web application firewall rules that share common functionality and traits

                                                                                                                        waf-rule-groups

                                                                                                                        Object definition

                                                                                                                        View properties and constraints defined on the object

                                                                                                                        Show definition

                                                                                                                        waf-rule-groups-list-rule-groups

                                                                                                                        GET List rule groups
                                                                                                                        • free
                                                                                                                        • pro
                                                                                                                        • business
                                                                                                                        • enterprise

                                                                                                                        Search, list, and sort rule groups contained within a package

                                                                                                                        GET zones/:zone_identifier/firewall/waf/packages/:package_identifier/groups

                                                                                                                        Optional parameters

                                                                                                                        Name /typeDescription /exampleConstraints
                                                                                                                        name
                                                                                                                        string

                                                                                                                        Name of the firewall rule group

                                                                                                                        "Project Honey Pot"
                                                                                                                        • read only
                                                                                                                        mode

                                                                                                                        Whether or not the rules contained within this group are configurable/usable

                                                                                                                        "on"
                                                                                                                        • default value: on
                                                                                                                        • valid values: on, off
                                                                                                                        rules_count
                                                                                                                        number

                                                                                                                        How many rules are contained within this group

                                                                                                                        10
                                                                                                                        • default value: 0
                                                                                                                        • read only
                                                                                                                        page
                                                                                                                        number

                                                                                                                        Page number of paginated results

                                                                                                                        1
                                                                                                                        • default value: 1
                                                                                                                        • min value:1
                                                                                                                        per_page
                                                                                                                        number

                                                                                                                        Number of groups per page

                                                                                                                        50
                                                                                                                        • default value: 50
                                                                                                                        • min value:5
                                                                                                                        • max value:100
                                                                                                                        order

                                                                                                                        Field to order groups by

                                                                                                                        "mode"
                                                                                                                        • valid values: mode, rules_count
                                                                                                                        direction

                                                                                                                        Direction to order groups

                                                                                                                        "desc"
                                                                                                                        • valid values: asc, desc
                                                                                                                        match

                                                                                                                        Whether to match all search requirements or at least one (any)

                                                                                                                        "all"
                                                                                                                        • default value: all
                                                                                                                        • valid values: any, all
                                                                                                                        cURL (example)
                                                                                                                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages/a25a9a7e9c00afc1fb2e0245519d725b/groups?name=Project Honey Pot&mode=on&rules_count=10&page=1&per_page=50&order=mode&direction=desc&match=all" \
                                                                                                                             -H "X-Auth-Email: [email protected]" \
                                                                                                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                             -H "Content-Type: application/json"
                                                                                                                        Response (example)
                                                                                                                        {
                                                                                                                          "success": true,
                                                                                                                          "errors": [],
                                                                                                                          "messages": [],
                                                                                                                          "result": [
                                                                                                                            {
                                                                                                                              "id": "de677e5818985db1285d0e80225f06e5",
                                                                                                                              "name": "Project Honey Pot",
                                                                                                                              "description": "Group designed to protect against IP addresses that are a threat and typically used to launch DDoS attacks",
                                                                                                                              "rules_count": 10,
                                                                                                                              "modified_rules_count": 2,
                                                                                                                              "package_id": "a25a9a7e9c00afc1fb2e0245519d725b",
                                                                                                                              "mode": "on",
                                                                                                                              "allowed_modes": [
                                                                                                                                "on",
                                                                                                                                "off"
                                                                                                                              ]
                                                                                                                            }
                                                                                                                          ],
                                                                                                                          "result_info": {
                                                                                                                            "page": 1,
                                                                                                                            "per_page": 20,
                                                                                                                            "count": 1,
                                                                                                                            "total_count": 2000
                                                                                                                          }
                                                                                                                        }
                                                                                                                        waf-rule-groups-rule-group-info

                                                                                                                        GET Rule group info
                                                                                                                        • free
                                                                                                                        • pro
                                                                                                                        • business
                                                                                                                        • enterprise

                                                                                                                        Get a single rule group

                                                                                                                        GET zones/:zone_identifier/firewall/waf/packages/:package_identifier/groups/:identifier
                                                                                                                        cURL (example)
                                                                                                                        curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages/a25a9a7e9c00afc1fb2e0245519d725b/groups/de677e5818985db1285d0e80225f06e5" \
                                                                                                                             -H "X-Auth-Email: [email protected]" \
                                                                                                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                             -H "Content-Type: application/json"
                                                                                                                        Response (example)
                                                                                                                        {
                                                                                                                          "success": true,
                                                                                                                          "errors": [],
                                                                                                                          "messages": [],
                                                                                                                          "result": {
                                                                                                                            "id": "de677e5818985db1285d0e80225f06e5",
                                                                                                                            "name": "Project Honey Pot",
                                                                                                                            "description": "Group designed to protect against IP addresses that are a threat and typically used to launch DDoS attacks",
                                                                                                                            "rules_count": 10,
                                                                                                                            "modified_rules_count": 2,
                                                                                                                            "package_id": "a25a9a7e9c00afc1fb2e0245519d725b",
                                                                                                                            "mode": "on",
                                                                                                                            "allowed_modes": [
                                                                                                                              "on",
                                                                                                                              "off"
                                                                                                                            ]
                                                                                                                          }
                                                                                                                        }
                                                                                                                        waf-rule-groups-update-rule-group

                                                                                                                        PATCH Update Rule group
                                                                                                                        • free
                                                                                                                        • pro
                                                                                                                        • business
                                                                                                                        • enterprise

                                                                                                                        Update the state of a rule group

                                                                                                                        PATCH zones/:zone_identifier/firewall/waf/packages/:package_identifier/groups/:identifier

                                                                                                                        Optional parameters

                                                                                                                        Name /typeDescription /exampleConstraints
                                                                                                                        mode

                                                                                                                        Whether or not the rules contained within this group are configurable/usable

                                                                                                                        "on"
                                                                                                                        • default value: on
                                                                                                                        • valid values: on, off
                                                                                                                        cURL (example)
                                                                                                                        curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages/a25a9a7e9c00afc1fb2e0245519d725b/groups/de677e5818985db1285d0e80225f06e5" \
                                                                                                                             -H "X-Auth-Email: [email protected]" \
                                                                                                                             -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                             -H "Content-Type: application/json" \
                                                                                                                             --data '{"mode":"on"}'
                                                                                                                        Response (example)
                                                                                                                        {
                                                                                                                          "success": true,
                                                                                                                          "errors": [],
                                                                                                                          "messages": [],
                                                                                                                          "result": {
                                                                                                                            "id": "de677e5818985db1285d0e80225f06e5",
                                                                                                                            "name": "Project Honey Pot",
                                                                                                                            "description": "Group designed to protect against IP addresses that are a threat and typically used to launch DDoS attacks",
                                                                                                                            "rules_count": 10,
                                                                                                                            "modified_rules_count": 2,
                                                                                                                            "package_id": "a25a9a7e9c00afc1fb2e0245519d725b",
                                                                                                                            "mode": "on",
                                                                                                                            "allowed_modes": [
                                                                                                                              "on",
                                                                                                                              "off"
                                                                                                                            ]
                                                                                                                          }
                                                                                                                        }

                                                                                                                        WAF Rules

                                                                                                                        A firewall rule for a zone

                                                                                                                        waf-rules

                                                                                                                        Object definitions

                                                                                                                        View properties and constraints defined on the object

                                                                                                                        Show definitions

                                                                                                                        waf-rules-list-rules

                                                                                                                        GET List rules
                                                                                                                        • free
                                                                                                                        • pro
                                                                                                                        • business
                                                                                                                        • enterprise

                                                                                                                        Search, sort, and filter rules within a package

                                                                                                                        GET zones/:zone_id/firewall/waf/packages/:package_id/rules

                                                                                                                        Optional parameters

                                                                                                                        Name /typeDescription /exampleConstraints
                                                                                                                        mode
                                                                                                                        object

                                                                                                                        The rule mode

                                                                                                                        "on"
                                                                                                                        One of the following:
                                                                                                                        Whether or not the anomaly-based rule will be used when evaluating the request.
                                                                                                                        The mode that the traditional firewall rule uses when triggered.
                                                                                                                        Defines whether or not the white-list rule should be allowed when matching the request.
                                                                                                                          priority
                                                                                                                          number

                                                                                                                          The order in which the individual rule is executed within the related group

                                                                                                                          5
                                                                                                                          • read only
                                                                                                                          match

                                                                                                                          Whether to match all search requirements or at least one (any)

                                                                                                                          "all"
                                                                                                                          • default value: all
                                                                                                                          • valid values: any, all
                                                                                                                          order

                                                                                                                          Field to order rules by

                                                                                                                          "status"
                                                                                                                          • valid values: priority, group_id, description
                                                                                                                          page
                                                                                                                          number

                                                                                                                          Page number of paginated results

                                                                                                                          1
                                                                                                                          • default value: 1
                                                                                                                          • min value:1
                                                                                                                          per_page
                                                                                                                          number

                                                                                                                          Number of rules per page

                                                                                                                          50
                                                                                                                          • default value: 50
                                                                                                                          • min value:5
                                                                                                                          • max value:100
                                                                                                                          group_id
                                                                                                                          string

                                                                                                                          WAF group identifier tag

                                                                                                                          "de677e5818985db1285d0e80225f06e5"
                                                                                                                          • max length: 32
                                                                                                                          • read only
                                                                                                                          description
                                                                                                                          string

                                                                                                                          Public description of the rule

                                                                                                                          "SQL injection prevention for SELECT statements"
                                                                                                                          • read only
                                                                                                                          direction

                                                                                                                          Direction to order rules

                                                                                                                          "desc"
                                                                                                                          • valid values: asc, desc
                                                                                                                          cURL (example)
                                                                                                                          curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages/a25a9a7e9c00afc1fb2e0245519d725b/rules?description=SQL injection prevention for SELECT statements&mode=on&priority=5&group_id=de677e5818985db1285d0e80225f06e5&page=1&per_page=50&order=status&direction=desc&match=all" \
                                                                                                                               -H "X-Auth-Email: [email protected]" \
                                                                                                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                               -H "Content-Type: application/json"
                                                                                                                          Response (example)
                                                                                                                          {
                                                                                                                            "success": true,
                                                                                                                            "errors": [],
                                                                                                                            "messages": [],
                                                                                                                            "result": [
                                                                                                                              {
                                                                                                                                "id": "f939de3be84e66e757adcdcb87908023",
                                                                                                                                "description": "SQL injection prevention for SELECT statements",
                                                                                                                                "priority": 5,
                                                                                                                                "group": {
                                                                                                                                  "id": "de677e5818985db1285d0e80225f06e5",
                                                                                                                                  "name": "Project Honey Pot"
                                                                                                                                },
                                                                                                                                "package_id": "a25a9a7e9c00afc1fb2e0245519d725b",
                                                                                                                                "allowed_modes": [
                                                                                                                                  "on",
                                                                                                                                  "off"
                                                                                                                                ],
                                                                                                                                "mode": "on"
                                                                                                                              }
                                                                                                                            ],
                                                                                                                            "result_info": {
                                                                                                                              "page": 1,
                                                                                                                              "per_page": 20,
                                                                                                                              "count": 1,
                                                                                                                              "total_count": 2000
                                                                                                                            }
                                                                                                                          }
                                                                                                                          waf-rules-rule-info

                                                                                                                          GET Rule info
                                                                                                                          • free
                                                                                                                          • pro
                                                                                                                          • business
                                                                                                                          • enterprise

                                                                                                                          Individual information about a rule

                                                                                                                          GET zones/:zone_id/firewall/waf/packages/:package_id/rules/:identifier
                                                                                                                          cURL (example)
                                                                                                                          curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages/a25a9a7e9c00afc1fb2e0245519d725b/rules/f939de3be84e66e757adcdcb87908023" \
                                                                                                                               -H "X-Auth-Email: [email protected]" \
                                                                                                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                               -H "Content-Type: application/json"
                                                                                                                          Response (example)
                                                                                                                          {
                                                                                                                            "success": true,
                                                                                                                            "errors": [],
                                                                                                                            "messages": [],
                                                                                                                            "result": {
                                                                                                                              "id": "f939de3be84e66e757adcdcb87908023",
                                                                                                                              "description": "SQL injection prevention for SELECT statements",
                                                                                                                              "priority": 5,
                                                                                                                              "group": {
                                                                                                                                "id": "de677e5818985db1285d0e80225f06e5",
                                                                                                                                "name": "Project Honey Pot"
                                                                                                                              },
                                                                                                                              "package_id": "a25a9a7e9c00afc1fb2e0245519d725b",
                                                                                                                              "allowed_modes": [
                                                                                                                                "on",
                                                                                                                                "off"
                                                                                                                              ],
                                                                                                                              "mode": "on"
                                                                                                                            }
                                                                                                                          }
                                                                                                                          waf-rules-update-rule

                                                                                                                          PATCH Update rule
                                                                                                                          • free
                                                                                                                          • pro
                                                                                                                          • business
                                                                                                                          • enterprise

                                                                                                                          Update the action the rule will perform if triggered on the zone

                                                                                                                          PATCH zones/:zone_id/firewall/waf/packages/:package_id/rules/:identifier

                                                                                                                          Optional parameters

                                                                                                                          Name /typeDescription /exampleConstraints
                                                                                                                          mode

                                                                                                                          The mode to use when the rule is triggered. Value is restricted based on the allowed_modes of the rule

                                                                                                                          "on"
                                                                                                                          • valid values: default, disable, simulate, block, challenge, on, off
                                                                                                                          cURL (example)
                                                                                                                          curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/waf/packages/a25a9a7e9c00afc1fb2e0245519d725b/rules/f939de3be84e66e757adcdcb87908023" \
                                                                                                                               -H "X-Auth-Email: [email protected]" \
                                                                                                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                               -H "Content-Type: application/json" \
                                                                                                                               --data '{"mode":"on"}'
                                                                                                                          Response (example)
                                                                                                                          {
                                                                                                                            "success": true,
                                                                                                                            "errors": [],
                                                                                                                            "messages": [],
                                                                                                                            "result": {
                                                                                                                              "id": "f939de3be84e66e757adcdcb87908023",
                                                                                                                              "description": "SQL injection prevention for SELECT statements",
                                                                                                                              "priority": 5,
                                                                                                                              "group": {
                                                                                                                                "id": "de677e5818985db1285d0e80225f06e5",
                                                                                                                                "name": "Project Honey Pot"
                                                                                                                              },
                                                                                                                              "package_id": "a25a9a7e9c00afc1fb2e0245519d725b",
                                                                                                                              "allowed_modes": [
                                                                                                                                "on",
                                                                                                                                "off"
                                                                                                                              ],
                                                                                                                              "mode": "on"
                                                                                                                            }
                                                                                                                          }

                                                                                                                          User-Agent Blocking Rules

                                                                                                                          Perform access control when matching the exact UserAgent reported by the client

                                                                                                                          The access control mechanisms can be defined within a rule to help manage traffic from particular clients. This will enable you to customise the access to your site. The mechanisms are: -

                                                                                                                          block - Blocks the request immediately

                                                                                                                          challenge - Send a challenge to the originator of the request

                                                                                                                          js_challenge - Send a JavaScript based challenge to the originator of the request

                                                                                                                          user-agent-blocking-rules

                                                                                                                          Object definition

                                                                                                                          View properties and constraints defined on the object

                                                                                                                          Show definition

                                                                                                                          user-agent-blocking-rules-list-useragent-rules

                                                                                                                          GET List UserAgent rules
                                                                                                                          • free
                                                                                                                          • pro
                                                                                                                          • business
                                                                                                                          • enterprise

                                                                                                                          List the UserAgent rules on a zone.

                                                                                                                          GET zones/:zone_identifier/firewall/ua_rules

                                                                                                                          Optional parameters

                                                                                                                          Name /typeDescription /exampleConstraints
                                                                                                                          page
                                                                                                                          number

                                                                                                                          Page number of paginated results

                                                                                                                          1
                                                                                                                          • default value: 1
                                                                                                                          • min value:1
                                                                                                                          per_page
                                                                                                                          number

                                                                                                                          Number of UserAgent rules per page

                                                                                                                          20
                                                                                                                          • default value: 20
                                                                                                                          • min value:5
                                                                                                                          • max value:100
                                                                                                                          cURL (example)
                                                                                                                          curl -X GET "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/firewall/ua_rules?page=1&per_page=20" \
                                                                                                                               -H "X-Auth-Email: [email protected]" \
                                                                                                                               -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
                                                                                                                               -H "Content-Type: application/json"
                                                                                                                          Response (example)
                                                                                                                          {
                                                                                                                            "success": true,
                                                                                                                            "errors": [],
                                                                                                                            "messages": [],
                                                                                                                            "result": [
                                                                                                                              {
                                                                                                                                "id": "372e67954025e0ba6aaa6d586b9e0b59",
                                                                                                                                "paused": false,
                                                                                                                                "description": "Prevent access from abusive clients identified by this UserAgent to mitigate DDoS attack",
                                                                                                                                "mode": "js_challenge",
                                                                                                                                "configuration": {
                                                                                                                                  "target": "ua",
                                                                                                                                  "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4"
                                                                                                                                }
                                                                                                                              }
                                                                                                                            ],
                                                                                                                            "result_info": {
                                                                                                                              "page": 1,
                                                                                                                              "per_page": 20,
                                                                                                                              "count": 1,
                                                                                                                              "total_count": 2000
                                                                                                                            }
                                                                                                                          }
                                                                                                                          user-agent-blocking-rules-create-a-useragent-rule

                                                                                                                          POST Create a UserAgent rule
                                                                                                                          • free
                                                                                                                          • pro
                                                                                                                          • business
                                                                                                                          • enterprise

                                                                                                                          Create a new UserAgent rule for a zone. See the record object definitions for required attributes for each record type

                                                                                                                          POST zones/:zone_identifier/firewall/ua_rules

                                                                                                                          Required parameters

                                                                                                                          Name /typeDescription /exampleConstraints
                                                                                                                          mode

                                                                                                                          The type of action to perform.

                                                                                                                          "js_challenge"
                                                                                                                          • max length: 12
                                                                                                                          • valid values: block, challenge, js_challenge
                                                                                                                          configuration
                                                                                                                          object

                                                                                                                          Target/Value pair to use for this rule. The value is the exact UserAgent to match

                                                                                                                          { "target": "ua", "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4" }
                                                                                                                          An object with the following properties:

                                                                                                                            Optional parameters

                                                                                                                            Name /typeDescription /exampleConstraints
                                                                                                                            id
                                                                                                                            string

                                                                                                                            UA rule identifier

                                                                                                                            "372e67954025e0ba6aaa6d586b9e0b59"
                                                                                                                            • max length: 32
                                                                                                                            • read only
                                                                                                                            paused
                                                                                                                            boolean

                                                                                                                            Whether this UA rule is currently paused

                                                                                                                            false
                                                                                                                            • valid values: (true,false)
                                                                                                                            description
                                                                                                                            string

                                                                                                                            Some useful information about this rule to help identify the purpose of it.

                                                                                                                            "Prevent access from abusive clients identified by this UserAgent to mitigate DDoS attack"
                                                                                                                            • max length: 1024