Skip to main content
Use these endpoints to manage clients and custom client fields in MainWP Dashboard.
Use the MainWP Postman collection as the source of truth for request and response schemas.
{id_or_email} accepts either a numeric client ID or a client email.

Route Matrix

Client Records

MethodPathPurposeKey Params
GET/clientsList clientspage, per_page, search, include, exclude, status
GET/clients/countCount clientsCollection filters
POST/clients/addCreate a clientname, client_email, optional address/contact fields
GET/clients/{id_or_email}Get one clientid_or_email
POST, PUT, PATCH/clients/{id_or_email}/editEdit a clientEditable client fields
DELETE/clients/{id_or_email}/removeDelete a clientid_or_email
GET/clients/{id_or_email}/sitesList client sitesid_or_email
GET/clients/{id_or_email}/sites/countCount client sitesid_or_email
GET/clients/{id_or_email}/costsList client costsid_or_email
POST, PUT, PATCH/clients/{id_or_email}/suspendSuspend clientid_or_email
POST, PUT, PATCH/clients/{id_or_email}/unsuspendUnsuspend clientid_or_email
POST/clients/batchBatch client create/update/deletecreate[], update[], delete[]

Client Fields

MethodPathPurposeKey Params
GET/clients/fieldsList client fieldssearch, include, exclude, page, pre_page
POST/clients/fields/addCreate a client fieldname, description
PUT, PATCH/clients/fields/{id_name}/editEdit a client fieldname, description
DELETE/clients/fields/{id_name}/deleteDelete a client field{id_name} (field id or field name)

Representative Requests

Create a client

curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme","client_email":"[email protected]","client_phone":"+1-555-0100"}' \
  "https://your-dashboard.com/wp-json/mainwp/v2/clients/add"
{
  "success": 1,
  "message": "Client added successfully.",
  "data": {
    "id": 34,
    "name": "Acme",
    "client_email": "[email protected]"
  }
}

Create a client field

curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Account Manager","description":"Primary owner"}' \
  "https://your-dashboard.com/wp-json/mainwp/v2/clients/fields/add"
{
  "success": 1,
  "message": "Client field created successfully.",
  "data": {
    "field_id": 6,
    "name": "Account Manager",
    "description": "Primary owner"
  }
}