Skip to main content
The MainWP Wordfence Add-on registers three read-only abilities in the mainwp-wordfence category. All three use the mainwp/ namespace on your MainWP Dashboard. Use them to check a site’s Wordfence status from a script, a report, or an AI tool. They return what the Dashboard stored at the last sync. They do not start a scan, contact the Child site, or change settings.

What You’ll Learn

  • Read a site’s stored scan status and last scan time
  • Read whether the last completed scan found issues, plus blocked-attack counts
  • Read a site’s Wordfence settings without exposing keys or private data
  • Handle permission and input errors

Prerequisites

  • WordPress 6.9 or later on the MainWP Dashboard site
  • MainWP Dashboard with Abilities API support; use version 6.2 or later for the input_json examples below
  • A Wordfence Add-on release with Abilities support, active in MainWP Dashboard
  • An authenticated user with manage_options and access to the Wordfence Add-on
  • Dashboard access to the site you want to read
  • Wordfence active on the managed site. Run Sync Data, then open that site’s Wordfence page in MainWP Dashboard to load its stored data
Use an Application Password or the authentication methods in the Abilities API overview. The examples use an Application Password. Each ability checks permissions again when it runs. If you use Team Control, the user needs access to the Wordfence Add-on and to the requested site.

Available Abilities

Discover the full input and output schemas:
All three abilities are marked readonly: true, destructive: false, and idempotent: true. Inputs and outputs reject extra properties.

Request Rules

Each ability reads one site at a time and takes one input: Send no other properties. Every response starts with site_id and site_name, the site’s name in MainWP Dashboard.

Read the Scan Status

Ability: mainwp/wordfence-scan-status-v1
Method: GET
Example response:
unknown does not mean the site has problems. The Dashboard stores status 2 only when a completed scan finds issues. It has no record that proves a scan finished clean, so the ability does not claim one. last_scan can also be the time a scan started rather than finished.

Read the Issues Summary

Ability: mainwp/wordfence-issues-summary-v1
Method: GET
Example response:
The Dashboard does not store how many issues a scan found, so the response has no issue count. To see the issues, open the site in the Wordfence Dashboard.
The attack counts can stay at 0 when the Child site sends no counts during sync. A 0 here does not prove that no attacks were blocked.

Read the Settings

Ability: mainwp/wordfence-settings-v1
Method: GET
Example response:
The settings object contains only these keys. A setting that is missing or stored in an unexpected format is left out, so settings can be an empty object. The response never includes the API key, license details, email addresses, IP lists, firewall rule data, or free-text settings. To change settings, use the Wordfence settings in MainWP Dashboard.

Handle Errors

MainWP Dashboard returns HTTP 401 for unauthenticated requests. WordPress can also reject input that does not match the schema before the Add-on runs.