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_dueflag 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_optionsand access to the Cost Tracker Assistant Add-on
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:
Get Assistant Status
Ability:mainwp/get-cost-tracker-assistant-status-v1Method: GET This ability takes no input. Send no input, an empty object, or
null. Any other property is rejected.
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-v1Method: 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_notificationdays
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.
Related Resources
- Cost Tracker Assistant - Renewal notification settings and upload automation
- Cost Tracker - Core cost tracking features
- Abilities API Overview - Authentication and request formats
