mainwp-white-label category. They use the mainwp/ namespace on your MainWP Dashboard.
What You’ll Learn
- Read the general White Label flags and the number of accessible sites that override them
- List accessible sites with stored White Label settings, one page at a time
- Understand which settings the responses leave out
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_jsonexample below - White Label with Abilities support, active in MainWP Dashboard
- An authenticated user with
manage_options - Access to the White Label Add-on
Available Abilities
Discover the abilities and their full input and output schemas:
readonly: true, destructive: false, and idempotent: true.
These abilities read what the White Label Add-on has stored on your MainWP Dashboard. They do not save settings, push settings to Child sites, sync sites, or contact Child sites. A stored value does not prove that a Child site currently shows it.
Get General Settings
Ability:mainwp/get-white-label-settings-v1Method: GET This ability takes no input. Send no input or an empty object; any property is rejected.
The response contains only these 11 fields. It does not return the custom plugin header text, the support contact email, support messages, or appearance settings such as logos, colors, and custom CSS.
List Sites
Ability:mainwp/list-white-label-sites-v1Method: GET Lists accessible sites that have stored White Label settings on the Dashboard. A site with no stored White Label settings does not appear in the list.
Any other property is rejected.
A page past the last site returns an empty
sites array with the same total. When site_id names an accessible site with no stored White Label settings, the response has an empty sites array and total: 0.
Each entry in sites contains:
Each entry contains only these 13 fields. The site URL, the custom plugin header text, the support contact email, support messages, and appearance settings are not returned. The ability reports what is stored for each site; it does not tell you which settings a Child site received in its last update.
Per-site flags apply when
override is true. Otherwise, the site’s stored values do not replace the general settings.
Labels
contact_button_label and name are plain text, limited to 128 characters, with HTML removed. A value that looks like contact or link information comes back as an empty string:
- Any value containing
@, containing://, or starting with// - A
contact_button_labelcontainingwww.
Handle Errors
If the White Label database table does not exist yet, the site list is empty and
override_site_count is 0.
Related Resources
- White Label - Settings, per-site overrides, and support form
- Abilities API Overview - Authentication and request formats
- Team Control - Limit users to selected sites and Add-ons
