This page is intended for developers. It shows how to control BigScoots Cache from outside the WordPress dashboard: from a script, a deployment pipeline, another app, or a tool like Postman.
With the BigScoots Cache REST API you can:
Clear the cache (whole site, page cache only, specific posts, specific URLs, or specific logged-in users)
Clear OPcache
Enable or disable the cache, and turn on cache for logged-in users
Check the plugin status and test whether page caching works
Save plugin settings and import a settings file
Clear the plugin log
All endpoints live under https://example.com/wp-json/bigscoots-cache/v2/. Replace example.com with your own domain.
Who can use the API
Every request must be authenticated as a WordPress user. Requests without valid credentials are rejected.
Administrators can use every endpoint.
Other user roles can use the cache endpoints (clear cache, clear OPcache, enable/disable cache, status, test cache) if an admin has allowed that role. To do that, open the BigScoots Cache settings page, click Show Plugin Settings, then go to Advanced → Permission Settings → Select user roles allowed to purge the cache.
Every other endpoint is for administrators only. The table under API Endpoints shows which is which.
Step 1: Generate an Application Password
WordPress Application Passwords let you authenticate API requests without using your normal login password. If you prefer to watch, the video at the end of this article shows every step.
1. Log in to your WordPress dashboard and go to Users → Profile.
2. Scroll down to the Application Passwords section, enter a name you will recognize later (for example, BigScoots Cache API), and click Add New Application Password.
3. Copy the new password right away and save it somewhere safe. WordPress shows it only once. You won't be able to see it again after you leave the page.
The password contains spaces (for example, abcd EFGH 1234 ijkl MNOP 5678). The spaces are part of the password. Copy it exactly as shown.
You now have the two things every request needs:
Your WordPress username (shown at the top of the Profile page)
The Application Password you just generated
Note: WordPress only allows Application Passwords over HTTPS. If you don't see the Application Passwords section, check that your site loads over https://, and that a security plugin hasn't turned the feature off.
Treat an Application Password like any other password. If one is lost or no longer needed, revoke it from the same Application Passwords section.
Step 2: Make an authenticated request
The API uses HTTP Basic authentication: your username and Application Password, joined by a colon and Base64-encoded, sent in the Authorization header.
With cURL, the -u option builds the header for you:
curl -X PATCH "https://example.com/wp-json/bigscoots-cache/v2/clear-cache" \
-u "your-username:abcd EFGH 1234 ijkl MNOP 5678" \
-H "Content-Type: application/json" \
-d '{"purge_type": "all"}'
With Postman, open the Authorization tab, choose Basic Auth, and enter your username and Application Password. Postman then adds the header for you. You can see it on the Headers tab.
From your own code, send the header directly:
Authorization: Basic <base64 of "your-username:your application password">
You can copy the ready-made value from Postman's Headers tab (the whole value, including the word `Basic` and the space after it).
Requests that send a JSON body must also send Content-Type: application/json.
API Endpoints
What it does | Endpoint | Method | Who can use it |
| PATCH | Admins and allowed roles | |
| DELETE | Admins and allowed roles | |
| PATCH | Admins and allowed roles | |
| PATCH | Admins and allowed roles | |
| GET | Admins and allowed roles | |
| GET | Admins and allowed roles | |
| PATCH | Admins only | |
| POST | Admins only | |
| POST | Admins only | |
| DELETE | Admins only |
Every endpoint is under /wp-json/bigscoots-cache/v2/, so the full URL for clearing the cache is https://example.com/wp-json/bigscoots-cache/v2/clear-cache.
Each endpoint accepts only the method listed. Any other method returns a 405 error.
Clear Cache
API Endpoint: /wp-json/bigscoots-cache/v2/clear-cache
Request Type: PATCH
The purge_type field in the request body decides what gets cleared. Cache clearing is not available on staging sites (they are never cached), or while the cache is disabled.
A successful request returns:
{
"success": true,
"status": "success",
"message": "Your request to clear cache has been submitted! Please allow up to 30 seconds for this to take effect."
}Clear everything (pages and static files)
Clears the whole site from the cache, including static files like images, CSS, and JavaScript.
{
"purge_type": "all"
}Clear the page cache only
Clears every cached page (HTML) but leaves static files like images, CSS, and JavaScript in the cache. Use this when your pages changed, but your static files did not.
{
"purge_type": "page_cache"
}This needs page cache to be turned on. The success message for this purge type says "clear the page cache" instead of "clear cache".
Clear specific posts
Clears the cache for the posts, pages, or custom post type entries you list.
{
"purge_type": "post_ids",
"post_ids": [1, 17]
}post_ids must be an array of numbers ([1, 17]), not strings (["1", "17"]).
Some post types, such as block theme templates, affect every page on the site. Clearing one of those clears the whole page cache.
To also clear the pages where those posts appear, such as the home page, archives, category and tag pages, add purge_related_urls:
{
"purge_type": "post_ids",
"post_ids": [1, 17],
"purge_related_urls": true
}If some of the IDs can't be cleared, the rest are still cleared and the response lists the skipped IDs under post_ids_with_error:
{
"success": true,
"status": "success",
"message": "Your request to clear cache has been submitted! Please allow up to 30 seconds for this to take effect.",
"post_ids_with_error": {
"post_doesnt_exists": [99999]
}
}Key | Meaning |
| No post exists with this ID. |
| The post belongs to a post type that BigScoots Cache is set to ignore. |
| The post is not published or private (for example, a draft). |
| WordPress returned no URL for this post. |
If none of the IDs can be cleared, the request fails with the error code no_post_id_eligible_for_cache_purge.
This needs page cache to be turned on.
Clear specific URLs
{
"purge_type": "urls",
"urls": [
"https://example.com/some-page/",
"https://example.com/some-post/",
"/blog/another-post/"
]
}You can pass full URLs or paths that start with /. Paths are resolved against your site's home URL.
By default, each URL is cleared together with everything under it. The query string is ignored. For example:
https://example.com/blog/clears/blog/and every URL that starts with/blog/, such as/blog/my-post/and/blog/page/2/.https://example.com/shop/?color=redclears/shop/and everything under it.Your home page URL (
https://example.com/) clears only the home page, not the whole site.
To clear only the exact URL you pass, including its query string, add exact_url_purge:
{
"purge_type": "urls",
"urls": ["https://example.com/shop/?color=red"],
"exact_url_purge": true
}exact_url_purge works only with "purge_type": "urls". Sending it with any other purge type returns an error.
Invalid URLs are skipped. If none of the URLs are valid, the request fails with the error code invalid_urls.
Clear the cache for specific logged-in users
Available only on the Boost plan, with cache for logged-in users turned on. Clears the cached pages of the users you list.
{
"purge_type": "user_ids",
"user_ids": [10302, 10254, 32012, 45021]
}user_ids must be an array of numbers, not strings.
Clear OPcache
API Endpoint: /wp-json/bigscoots-cache/v2/clear-opcache
Request Type: DELETE
Request Body: not needed
On success, you will get a response like this:
{
"success": true,
"status": "success",
"message": "OPcache for your website has been cleared successfully!"
}If OPcache can't be cleared (for example, the OPcache extension is not loaded on the server), the request fails with the error code opcache_purge_failed and HTTP status 424.
Enable Cache
API Endpoint: /wp-json/bigscoots-cache/v2/enable-cache
Request Type: PATCH
Request Body: not needed
On success, you will get a response like this:
{
"success": true,
"status": "success",
"message": "BigScoots Cache has been enabled successfully on your website."
}Disable Cache
API Endpoint: /wp-json/bigscoots-cache/v2/disable-cache
Request Type: PATCH
Request Body: not needed
This turns off the whole cache, pages and static files, and clears the cache for the whole site. To stop caching pages but keep caching static files, use Save Settings with page_cache_enabled set to 0 instead.
On success, you will get a response like this:
{
"success": true,
"status": "success",
"message": "BigScoots Cache has been disabled successfully on your website."
}Plugin Status
API Endpoint: /wp-json/bigscoots-cache/v2/status
Request Type: GET
Request Body: not needed
Returns an overview of how BigScoots Cache is set up and working on your site. Example response:
{
"success": true,
"status": "success",
"message": "Plugin status check request has been processed successfully.",
"data": {
"website_environment_type": { "label": "Website Environment Type", "value": "Production" },
"plugin_cache_status": { "label": "Plugin Cache Status", "value": "Enabled" },
"plugin_version": { "label": "Plugin Version", "value": "x.y.z" },
"plugin_setup_mode": { "label": "Plugin Setup Mode", "value": "Boost" },
"website_using_cloudflare": { "label": "Website Using Cloudflare", "value": "Yes" },
"cloudflare_setup_mode": { "label": "Cloudflare Setup Mode", "value": "Standard" },
"cache_rule_status": { "label": "Cache Rule Status", "value": "Working" },
"cache_by_user_status": { "label": "Cache by User Status", "value": "Disabled" },
"home_page_cache_status": { "label": "Home Page Cache Status", "value": "HIT" }
}
}Field | What it tells you |
| Whether the site is production or staging. |
|
|
| The installed BigScoots Cache version. |
| The plan the plugin is set up for ( |
| Whether the site is served through Cloudflare. |
|
|
| Whether the cache rules at Cloudflare are working. |
| Whether cache for logged-in users is enabled, disabled, or not supported. |
| The cache status of the home page (for example |
On staging sites, the checks that need a live request show Not Checked.
Test Page Cache
API Endpoint: /wp-json/bigscoots-cache/v2/test-cache
Request Type: GET
Request Body: not needed
Tests whether your home page is being served from the cache. This is the same test as the Test Cache button in the plugin settings.
When page caching works, you will get:
{
"success": true,
"status": "success",
"message": "Page caching is working properly.",
"home_page_url": "https://example.com/"
}When the test fails, the response has the error code page_cache_not_working_properly and a message explaining what went wrong. This failure is returned with HTTP status 200, so check the response body (success: true or the code field), not only the status code.
If page cache is turned off, the request fails with the error code page_cache_disabled. The test is not available on staging sites.
Enable Cache for Logged-in Users
API Endpoint: /wp-json/bigscoots-cache/v2/user-cache
Request Type: PATCH
Request Body: not needed
Admins only. Turns on cache for logged-in users, then clears the page cache so pages are cached under the new rules. This is the same action as the Turn on logged-in caching button in the dashboard notice.
It works only when all of these are true:
The site is on the Boost plan
The site is a production site, not staging
The cache and page cache are both turned on
On success, you will get a response like this:
{
"success": true,
"status": "success",
"message": "Logged-in user cache has been enabled on your website."
}If the site doesn't meet the conditions above, the request fails with the error code logged_in_user_cache_not_available. If our systems can't apply the change, it fails with logged_in_user_cache_error (HTTP status 500). In that case, please contact our support team.
This endpoint only turns the feature on. To turn it off, use Save Settings with `cache_logged_in_users` set to `0`.
Save Settings
API Endpoint: /wp-json/bigscoots-cache/v2/save-settings
Request Type: POST
Admins only. This endpoint saves the same settings as the Save Changes button on the plugin settings page.
Send only the settings you want to change. Any setting you leave out keeps its current value. For example, to stop caching search pages and turn on caching for author pages:
{
"bypass_search_pages": 1,
"bypass_author_pages": 0
}On success, you will get a response like this:
{
"success": true,
"status": "success",
"message": "Successfully updated the settings changes."
}A setting name that isn't listed below is ignored.
How values work
On/off settings take
1(on) or0(off).bypass_*settings are "Don't cache" options:1means the page type is not cached,0means it is cached.List settings (
excluded_urls,predefined_related_url_paths,excluded_post_types,prefetch_url_list) take a single string with one entry per line, separated by\n. Sending a list replaces the whole list. Send an empty string""to clear it.purge_rolestakes an array of role slugs as WordPress stores them, for example["editor", "shop_manager"](not"Shop Manager"). It also replaces the whole list. Send[]to remove every role.Most settings are only saved while page cache is on. If page cache is off, only the settings marked "Saved when page cache is off" below are saved, and the rest are ignored. To change both in one request, include
"page_cache_enabled": 1in the same request.
Page cache
Setting | What it controls | Value |
| Page caching. When off, pages are no longer cached, but static files (images, CSS, JavaScript) still are. |
|
Cache lifetime
Setting | Setting page label | Value |
| CDN Cache-Control max-age | Seconds. Recommended: |
| Browser Cache-Control max-age | Seconds. Recommended: |
Cache behavior
"Don't cache the following dynamic contents" options. 1 means the page type is not cached.
Setting | Page type |
| Single Posts ( |
| Pages ( |
| Front Page ( |
| Home ( |
| Archives ( |
| Tags ( |
| Categories ( |
| Search Pages ( |
| Author Pages ( |
| AMP Pages |
| Ajax Requests |
| Pages with query args |
| WP REST API Endpoints ( |
| Redirection done by WordPress (theme, plugins, or WordPress core) |
Other cache behavior settings:
Setting | Setting page label | Value |
| Prevent the following URIs from being cached | One path per line. |
| Additional related pages to clear cache | One path per line. |
| Prevent purging cache for the following Custom Post Types (CPT) | One post type name per line, for example |
| Enable Cache for Logged-in Users |
|
| Enable Prefetch URLs to improve Cache HIT Ratio |
|
| URLs to Prefetch | One URL per line. An empty string removes the list. |
| Strip response cookies on pages that should be cached |
|
| Automatically purge single post cache when a new comment is approved or deleted |
|
| Automatically purge related pages when a new comment is approved or deleted |
|
| Automatically purge the PHP OPcache when themes, plugins or WordPress core has been updated |
|
| Automatically purge the BigScoots CDN cache when themes, plugins or WordPress core has been updated |
|
When the WooCommerce cart or checkout, or the Easy Digital Downloads checkout, is set to not be cached, its URL is added to excluded_urls for you. You don't need to add it yourself.
WooCommerce
"Don't cache the following WooCommerce page types" options. 1 means the page type is not cached.
Setting | Page type |
| Cart ( |
| Checkout ( |
| Checkout's pay page ( |
| Product ( |
| Shop ( |
| Product Taxonomy ( |
| Product Tag ( |
| Product Category ( |
| WooCommerce Page ( |
| My Account Page ( |
Other WooCommerce settings:
Setting | Setting page label | Value |
| Bypass Cache on WooCommerce Cart Cookies |
|
| Bypass Cache on WooCommerce Session Cookies |
|
| Automatically purge cache for product pages and related archives on successful orders, stock changes and price changes |
|
| Automatically purge cache for scheduled sales |
|
Easy Digital Downloads
"Don't cache the following EDD page types" options. 1 means the page type is not cached.
Setting | Page type |
| Primary Checkout Page |
| Purchase History Page |
| Login Redirect Page |
| Success Page |
| Failure Page |
Setting | Setting page label | Value |
| Automatically purge purchased product pages when an order completes |
|
WP Rocket
"Automatically purge the cache when" options.
Setting | Setting page label | Value |
| WP Rocket flushes all caches |
|
| RUCSS generation process ends |
|
Advanced
Setting | Setting page label | Value |
| Enable auto Early Hints? |
|
| Auto prerender/prefetch URLs on mouse hover |
|
| Enable BFcache? |
|
| Remove purge option from toolbar |
|
| Select user roles allowed to purge the cache | Array of role slugs, for example |
| Keep settings on deactivation |
|
Plugin log
Setting | Setting page label | Value |
| Enable plugin logs? |
|
| Maximum plugin log file size (in MB) | Number of MB. The settings page allows |
| Log verbosity |
|
Cache for logged-in users and WooCommerce cookie settings
cache_logged_in_users, bypass_woo_cart_cookies, and bypass_woo_session_cookies are applied on our CDN as well as in the plugin. They work only on the Boost plan, on a production site, with page cache turned on.
When you change one of them:
The page cache is cleared, so pages are cached under the new rules.
If our systems can't apply the change, nothing in the request is saved, and the request fails with the error code
plugin_specific_cache_settings_error(HTTP status500). In that case, please contact our support team.If the settings were saved but clearing the page cache failed, the request still succeeds, and the
messagesays so. Clear the page cache yourself with the Clear Cache endpoint and"purge_type": "page_cache".
Import Settings
API Endpoint: /wp-json/bigscoots-cache/v2/import-config
Request Type: POST
Admins only. Imports a settings file exported from BigScoots Cache → Tools → Import/Export Settings → Export Settings. This is the same as the Import Settings button on that page.
Send the contents of the exported file as a string in the config field:
{
"config": "{\"cache_enabled\":1,\"maxage\":31536000,\"browser_maxage\":0, ...}"
}Importing does the following, in order:
Clears the whole cache (pages and static files) and the plugin log.
Restores the settings to their defaults.
Applies the settings from the file.
Leaves the cache disabled. Call the Enable Cache endpoint afterwards to turn it back on.
On success, you will get a response like this:
{
"success": true,
"status": "success",
"message": "Configurations imported successfully. Now you must re-enable the page cache."
}If config is missing, the request fails with config_not_provided. If the file is not a valid BigScoots Cache settings file, it fails with invalid_config_provided.
On the Boost plan, the file's cache for logged-in users and WooCommerce cookie settings are applied on our CDN too. If our systems can't apply them, nothing is imported, and the request fails with plugin_specific_cache_settings_error. On other plans, those three settings in the file are skipped.
Clear Plugin Log
API Endpoint: /wp-json/bigscoots-cache/v2/clear-logs
Request Type: DELETE
Request Body: not needed
Admins only. On success, you will get a response like this:
{
"success": true,
"status": "success",
"message": "BigScoots Cache plugin log has been cleared successfully."
}Error responses
When a request fails, the API returns the standard WordPress REST API error format:
{
"code": "cache_disabled",
"message": "Cannot process the clear cache request as the cache is disabled.",
"data": {
"status": 403
}
}Errors that only one endpoint returns are listed in that endpoint's section above. The common ones are:
Code | HTTP status | Why it happens |
| 401 | The username or Application Password is wrong. |
| 401 or 403 | The user's role is not allowed to use this endpoint. |
| 403 | The JSON body, |
| 403 | Cache clearing was requested on a staging site. Staging sites are never cached. |
| 403 | The cache is disabled. Enable it first. |
| 403 | The request needs page cache, and page cache is turned off. |
| 403 |
|
| 403 |
|
| 403 | A |
| 403 | BigScoots Cache is not set up correctly on this site. Please contact support. |
If edge caching isn't available for your site, every endpoint returns a 403 response in this format instead. If you see it, please contact our support team.
{
"success": false,
"status": "error",
"message": "Edge cache is not supported on this site."
}If you use the wrong request method (for example POST instead of PATCH), you will get a 405 response:
{
"success": false,
"status": "error",
"message": "Sorry! POST request is not allowed to this endpoint. Please make the request with appropriate method."
}If you run into an error you can't resolve, reach out to our support team with the request you sent and the response you got back, and we'll take a look with you.
Video Walkthrough
This short video (about 3 minutes) walks through generating an Application Password and making your first request with Postman: Making BigScoots Cache WP REST API Requests via Postman.


