Skip to main content
Cost Tracker Assistant registers two read-only abilities in the mainwp-cost-tracker-assistant category. Both use the mainwp/ namespace on your MainWP Dashboard.

What You’ll Learn

  • Read whether the Assistant and renewal alerts are enabled
  • Check the alert lead time and the scheduled alert check
  • List costs that fall inside the renewal alert window
  • Interpret the alert_due flag and paginate results

Prerequisites

  • WordPress 6.9 or later on the MainWP Dashboard site
  • MainWP Dashboard with Abilities API support
  • A Cost Tracker Assistant release with Abilities support, active in MainWP Dashboard
  • An authenticated WordPress user with manage_options and access to the Cost Tracker Assistant Add-on
Team Control and other extension-access restrictions apply. Users without Add-on access receive mainwp_permission_denied. Use an Application Password or the authentication methods in the Abilities API overview. The examples use an Application Password.

Available Abilities

Discover the abilities and their full input and output schemas:
Both abilities are read-only. They do not send emails, run or reschedule the alert check, or change costs or settings.

Get Assistant Status

Ability: mainwp/get-cost-tracker-assistant-status-v1
Method: GET
This ability takes no input. Send no input, an empty object, or null. Any other property is rejected.
Example response:
The response does not include email recipients, subjects, or templates.
assistant_enabled follows the setting the alert check uses. If you have never saved the Assistant toggle, the Dashboard can show the Assistant as on while this field reports false. Save the setting once to make both values match.

List Upcoming Renewal Alerts

Ability: mainwp/list-upcoming-cost-renewal-alerts-v1
Method: GET
Returns the costs the renewal alert check considers. A cost is included when it:
  • Has an active status
  • Is not a lifetime cost
  • Has a next renewal date that is now or within the next days_before_notification days
Results are sorted by next renewal date, earliest first.
Example response:
Costs alerted within the last seven days stay in the list with alert_due: false. alert_due reflects only this seven-day resend rule. Whether an email actually sends also depends on the status fields above. The response excludes notes, URLs, payment details, license keys, and assigned sites, clients, or tags. If the Cost Tracker tables do not exist, the ability returns an empty items list with total: 0.

Errors

MainWP Dashboard can also return its own authentication errors, such as HTTP 401 for unauthenticated requests.