Skip to main content
MainWP registers 11 client management abilities into the WordPress Abilities API framework. These enable programmatic management of client records, site associations, and client-level operations.

What You’ll Learn

  • Listing, filtering, and retrieving client information
  • Creating, updating, and deleting clients
  • Managing client site associations
  • Suspending and unsuspending clients
  • Retrieving client cost data

mainwp/list-clients-v1

List MainWP clients with pagination and filtering. Method: GET (readonly)
Input Parameters: Response:

mainwp/count-clients-v1

Get total count of clients. Method: GET (readonly)
Input Parameters: Response:

mainwp/get-client-v1

Get detailed information about a single client. Method: POST
Input Parameters: Response:

mainwp/add-client-v1

Create a new client. Method: POST
Input Parameters: Response: Returns the created client object (same format as get-client-v1).

mainwp/update-client-v1

Update an existing client. Method: POST
Input Parameters: Response: Returns the updated client object.

mainwp/delete-client-v1

Delete a client. This is a destructive operation that requires confirmation. Method: POST
Input Parameters: Response:

mainwp/get-client-sites-v1

Get sites associated with a client. Method: POST
Input Parameters: Response:

mainwp/count-client-sites-v1

Count sites associated with a client. Method: POST
Input Parameters: Response:

mainwp/get-client-costs-v1

Get cost tracker entries for a client. Requires the Cost Tracker module to be active. Method: POST
Input Parameters: Response:
This ability requires the Cost Tracker module. If inactive, returns mainwp_module_not_available error.

mainwp/suspend-client-v1

Suspend a client. This also suspends all associated sites. Method: POST
Input Parameters: Response:

mainwp/unsuspend-client-v1

Unsuspend a previously suspended client. This also unsuspends all associated sites. Method: POST
Input Parameters: Response: