These abilities require a Domain Monitor release with Abilities API support. Earlier builds, including 5.4, do not register them. Check ability discovery on your Dashboard before using these examples.
mainwp-domain-monitor category. All use the mainwp/ namespace on your MainWP Dashboard.
Use these abilities to feed domain expiration data into scripts, reports, or AI assistants connected through the MainWP MCP Server. You can also use them to change monitoring settings, maintain manually entered domain data, and trigger checks without opening the Domain Monitor pages.
What You’ll Learn
- Read stored domain expiry summaries and detailed domain profiles
- Read and replace global or per-site monitoring policy
- Replace a manually entered domain profile
- Check one site’s domain through RDAP or WHOIS
- Request scheduled domain checks or expiry-alert evaluations for selected sites
- Use revisions, previews, and confirmation safely
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_jsonexamples below - A Domain Monitor release with Abilities support, active on MainWP Dashboard
- An authenticated user permitted to use MainWP abilities, with access to the Domain Monitor Add-on
- Access to the target sites
- Missing sites and sites outside the user’s Team Control selection return 404
mainwp_domain_monitor_site_not_found. Other Dashboard site-access refusals can return 403mainwp_domain_monitor_access_denied. - The summary list omits sites the user cannot access.
- Replacing the global policy requires access to all sites. Users restricted to selected sites can only change per-site policy.
- Application Password and session authentication require
manage_options. An authorized MainWP API key can also be used by a Team Control role with an explicit, nonempty site selection and permission to use MainWP abilities. Add-on and operation permissions still apply.
Available Abilities
The four read abilities are marked
readonly, non-destructive, and idempotent. They return stored data and never contact RDAP or WHOIS services. Policy replacement is idempotent. The other four write abilities are marked destructive and not idempotent, and they require a preview or explicit confirmation.
Discover the abilities and their schemas:
null values for required fields. Site IDs are positive JSON integers.
Revisions
Each read returns arevision, a 64-character lowercase hexadecimal string. Write abilities require the latest revision in expected_revision. If the stored data changed since your read, the write returns mainwp_domain_monitor_conflict (409). Read the data again and retry with the new revision.
Preview and confirmation
The manual profile, domain check, and batch request abilities requiredry_run and a caller-generated request_ref where listed:
- Send
dry_run: trueand omitconfirm(or set it tofalse) to preview. A preview validates input, permissions, and the revision, but changes nothing. - Send
dry_run: falseandconfirm: trueto execute. - Any other combination returns
mainwp_domain_monitor_invalid_input(400).
request_ref is a UUID (versions 1 through 5; version 4 recommended). Domain Monitor echoes it as request_id so you can correlate results.
Timestamps in profile and summary fields are Unix epoch seconds in UTC. A value of 0 means the date is unavailable. evaluated_at uses ISO 8601 format, such as 2026-11-03T14:00:00Z.
Get Site Expiry Summary
Ability:mainwp/get-site-domain-expiry-summary-v1Method: GET
lifecycle is expired when the expiration time has passed, and expiring when the domain expires within the site’s effective notification threshold. When the latest check failed, expires_at is 0 and lifecycle is unavailable. freshness is stale when the last check is older than the site’s effective check frequency.
List Expiry Summaries
Ability:mainwp/list-domain-expiry-summaries-v1Method: GET
Example response:
evaluated_at and are sorted by ascending site ID. The list includes only sites with a Domain Monitor record.
While has_more is true, send next_after_site_id as the next after_site_id. A page can contain fewer items than per_page, or none, because sites you cannot access are removed. Keep paging until has_more is false.
Get Monitoring Policy
Ability:mainwp/get-domain-monitor-policy-v1Method: GET Use
site_id: 0 for the global settings, or a site ID for that site’s effective settings.
For a site, the schedule, frequency, and threshold fields show the values Domain Monitor applies to that site.
Replace Monitoring Policy
Ability:mainwp/replace-domain-monitor-policy-v1Method: POST This replaces the complete policy. Send every field, even the ones you are not changing.
Example response:
scheduler_status is not_applicable, unchanged, reconciled, or unknown.
Turn on manual_mode before replacing a site’s manual profile. Turn it off before running Check site domain for that site.
Get Site Domain Profile
Ability:mainwp/get-site-domain-profile-v1Method: GET
profile_status and source use the same values as the expiry summary. When no profile is available, profile contains empty strings, empty arrays, and 0 dates. statuses contains up to 6 values and name_servers up to 4.
Replace Manual Domain Profile
Ability:mainwp/replace-site-manual-domain-profile-v1Method: POST Use this for sites with Manual domain information entry enabled, such as domains with unsupported TLDs. The site’s
manual_mode must be true; otherwise the call returns mainwp_domain_monitor_conflict. Enable it with Replace monitoring policy or in the site settings.
Preview the replacement:
"dry_run":false,"confirm":true to save it.
profile must include all 14 fields shown in Get site domain profile, except last_checked_at. Use empty strings, empty arrays, or 0 for unknown values. domain_name is required and must be a valid domain. registrar_url must be a valid URL, and registrar_abuse_contact_email must be empty or a valid email. Non-zero dates must be in order: created_at, then updated_at, then expires_at.
Example response:
status is preview, applied, unchanged, or outcome_unknown. The response never echoes profile data.
Check Site Domain
Ability:mainwp/check-site-domain-v1Method: POST This runs the same RDAP lookup, with WHOIS fallback, as the Check Domain action and stores the result. Domain Monitor derives the domain from the site’s URL. The site’s
manual_mode must be false.
dry_run: true) returns the derived domain_name without contacting RDAP or WHOIS.
Example response:
A
failed lookup leaves the stored profile unchanged. For unsupported_tld, consider entering the domain manually.
Request Domain Check Batch
Ability:mainwp/request-domain-check-batch-v1Method: POST Queue background domain checks for up to 100 sites. Domain Monitor’s scheduler runs the checks later.
A site is eligible when automated checks are enabled for it, manual mode is off, and its last check is older than its check frequency.
Example response:
accepted does not mean the checks finished. Read the expiry summaries later to see results. When retry_safe is false, do not resend the request.
Request Expiry Alert Evaluation
Ability:mainwp/request-domain-expiry-alert-evaluation-v1Method: POST Ask Domain Monitor to evaluate expiry alerts for up to 100 sites in the background. It uses the same inputs as Request domain check batch.
0, the latest check succeeded, the domain expires within the threshold, and no alert was sent for it in the last 24 hours.
Example response:
status uses the same values as the check batch, plus notifications_disabled when the Domain Monitor email notification is turned off in MainWP Dashboard. The response never confirms that an email was sent or delivered.
Error Handling
Standard authentication, schema, and method errors follow the Abilities API error reference. Domain Monitor abilities can also return:Related Resources
- Domain Monitor - Check domains and configure notifications and automated checks
- Abilities API Overview - Authentication, input formats, discovery, and errors
- Sites Abilities - Find site IDs for site-specific calls
