Skip to main content
Use these endpoints to manage Cost Tracker entries in MainWP Dashboard.
Use the MainWP Postman collection as the source of truth for request and response schemas.
Cost endpoints require the built-in Cost Tracker module to be enabled.

Route Matrix


Key Request Fields

Common write fields (create/edit):
  • name, price, payment_type, license_type, product_type, product_slug
  • renewal_type, last_renewal, payment_method, cost_tracker_status
  • url, note, visual fields like product_color, icon_hidden
  • Relationship selectors: sites, groups (tag IDs), and clients, each as a JSON array of integer IDs
At least one non-empty target set is required. You can combine sites, groups, and clients in the same request; all supplied selectors are saved and their linked sites are combined.
The example above shows only the relationship fields; include the other required cost fields when creating a cost. Use arrays, not comma-separated strings, for these selectors. For /costs/{id} routes, the URL identifies the cost. A conflicting id in the body or query string does not redirect the operation to another cost. /costs/add always creates a new cost rather than updating a body-supplied id; batch updates identify their target through each item’s id.

Representative Requests

Create a cost

Remove a cost