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)
Response:
mainwp/count-clients-v1
Get total count of clients. Method: GET (readonly)
Response:
mainwp/get-client-v1
Get detailed information about a single client. Method: POST
Response:
mainwp/add-client-v1
Create a new client. Method: POST
Response:
Returns the created client object (same format as
get-client-v1).
mainwp/update-client-v1
Update an existing client. Method: POST
Response:
Returns the updated client object.
mainwp/delete-client-v1
Delete a client. This is a destructive operation that requires confirmation. Method: POST
Response:
mainwp/get-client-sites-v1
Get sites associated with a client. Method: POST
Response:
mainwp/count-client-sites-v1
Count sites associated with a client. Method: POST
Response:
mainwp/get-client-costs-v1
Get cost tracker entries for a client. Requires the Cost Tracker module to be active. Method: POST
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
Response:
mainwp/unsuspend-client-v1
Unsuspend a previously suspended client. This also unsuspends all associated sites. Method: POST
Response:
Related Resources
- Abilities API Overview - API basics and authentication
- Sites Abilities - Site management abilities
- REST API Clients - REST API alternative for clients
- Manage Clients - Client management in Dashboard
