Skip to content

Clients Endpoints

Fresh

Source: MainWP Clients API

The {id_or_email} parameter accepts either a numeric client ID or email address.

Client Records

MethodPathDescription
GET/clientsList clients (pagination + filtering)
GET/clients/countClient count
POST/clients/addCreate client (requires name, client_email)
GET/clients/{id_or_email}Get single client
POST/PUT/PATCH/clients/{id_or_email}/editUpdate client
DELETE/clients/{id_or_email}/removeRemove client
GET/clients/{id_or_email}/sitesAssociated sites
GET/clients/{id_or_email}/sites/countSite count
GET/clients/{id_or_email}/costsAssociated costs
POST/PUT/PATCH/clients/{id_or_email}/suspendSuspend client
POST/PUT/PATCH/clients/{id_or_email}/unsuspendReactivate client
POST/clients/batchBatch operations

Custom Client Fields

MethodPathDescription
GET/clients/fieldsList custom fields
POST/clients/fields/addCreate field
PUT/PATCH/clients/fields/{id_name}/editModify field
DELETE/clients/fields/{id_name}/deleteRemove field

Example: Create Client

bash
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Corp", "client_email": "contact@acme.com"}' \
  "https://your-dashboard.com/wp-json/mainwp/v2/clients/add"