Mai CMMS API

A read-only REST API for integrating third-party applications with your Mai CMMS data. Use it to build dashboards, sync data to other tools, or power companion apps like Mai Maintenance Manager.

v1REST + JSONBearer token auth100 req/min

Base URL

All endpoints are rooted at:

https://maicmms.abacusai.app/api/external/v1

All requests must use HTTPS. HTTP requests will be redirected.

Authentication

The API uses Bearer token authentication. Generate your API key inside Mai CMMS under Settings → API Access → Generate Key. Keys have the format mcmk_....

Include the key in the Authorization header on every request:

Authorization: Bearer mcmk_your_key_here

Example:

curl -H "Authorization: Bearer mcmk_your_key_here" \
  https://maicmms.abacusai.app/api/external/v1/ping
Never expose your API key in client-side code, public repositories, or browser storage. Treat it like a password.

Rate limits

Each key is limited to 100 requests per minute (sliding window).

Every response includes these headers:

  • X-RateLimit-Limit — maximum requests per minute (100)
  • X-RateLimit-Remaining — remaining requests in the current window
  • X-RateLimit-Reset — Unix timestamp when the window resets

When the limit is exceeded you will receive HTTP 429 and a Retry-After header indicating how many seconds to wait.

Errors

The API returns standard HTTP status codes:

  • 200 OK — Success
  • 400 Bad Request — Invalid query parameters
  • 401 Unauthorized — Missing, invalid, expired or revoked API key
  • 404 Not Found — Resource does not exist in your organization
  • 429 Too Many Requests — Rate limit exceeded
  • 500 Internal Server Error — Unexpected error

Error responses have the shape:

{
  "error": "unauthorized",
  "message": "Invalid or expired API key"
}

Pagination

List endpoints support:

  • limit — Number of records (default 50, max 500)
  • offset — Records to skip (default 0)

Responses include pagination metadata:

{
  "data": [ ... ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 1247,
    "hasMore": true
  }
}

Incremental sync

Most list endpoints accept an updatedSince query parameter (ISO 8601 date) that returns only records modified on or after that date. Use this to poll for changes efficiently without re-downloading everything.

GET /api/external/v1/work-orders?updatedSince=2026-04-15T00:00:00Z

Recommended polling interval: every 1–5 minutes. Store the server time from the last successful sync and use it as the next updatedSince.

GET /ping

Health check and authentication verification. Returns info about your API key and organization.

curl -H "Authorization: Bearer mcmk_xxx" \
  https://maicmms.abacusai.app/api/external/v1/ping
Sample response
{
  "status": "ok",
  "message": "Mai CMMS External API v1",
  "apiVersion": "v1",
  "serverTime": "2026-04-18T15:30:00.000Z",
  "organization": {
    "id": "clx...",
    "name": "Acme Manufacturing",
    "createdAt": "2024-06-01T12:00:00.000Z",
    "subscriptionPlan": "professional"
  }
}

GET /assets

List assets in your organization.

ParameterTypeDescription
limitnumberMax records (default 50, max 500)
offsetnumberRecords to skip
updatedSinceISO dateOnly return assets updated since this time
statusstringFilter by status (active, retired, etc.)
locationIdstringFilter by location id
categoryIdstringFilter by category id

Fetch a single asset (by internal id or assetNumber like "4MET-008"):

GET /api/external/v1/assets/{id}
Sample response
{
  "data": [
    {
      "id": "clx...",
      "assetNumber": "4MET-008",
      "name": "CNC Mill #3",
      "description": "Haas VF-2 vertical machining center",
      "status": "active",
      "category": { "id": "clx...", "name": "Machining" },
      "location": { "id": "clx...", "name": "Shop Floor - Bay 3" },
      "manufacturer": "Haas Automation",
      "serialNumber": "1105443",
      "purchaseDate": "2020-03-15T00:00:00.000Z",
      "warrantyExpiration": null,
      "healthScore": 87,
      "riskLevel": "low",
      "parent": null,
      "photoUrl": "https://cdn.cs.1worldsync.com/syndication/mediaserverredirect/22e7f6fe76a91451dc6acf30e13caa9a/original.jpg",
      "createdAt": "2024-06-01T12:00:00.000Z",
      "updatedAt": "2026-04-15T09:20:00.000Z"
    }
  ],
  "pagination": { "limit": 50, "offset": 0, "total": 142, "hasMore": true }
}

GET /work-orders

List work orders (maintenance tasks) in your organization.

ParameterTypeDescription
limitnumberMax records (default 50, max 500)
offsetnumberRecords to skip
updatedSinceISO dateOnly return work orders updated since this time
statusstringpending, in_progress, completed, cancelled
prioritystringlow, medium, high, urgent
assetIdstringFilter by asset (internal id or assetNumber)
assignedTostringFilter by assigned user id
taskTypestringpm, cm, inspection, etc.
isWorkRequestbooltrue = only work requests, false = only work orders

Fetch a single work order (by internal id or taskId like "WO-04197"):

GET /api/external/v1/work-orders/{id}
Sample response
{
  "data": [
    {
      "id": "clx...",
      "workOrderNumber": "WO-04197",
      "title": "Replace spindle bearings",
      "description": "Bearings showing excessive vibration",
      "status": "in_progress",
      "priority": "high",
      "taskType": "cm",
      "isWorkRequest": false,
      "asset": { "id": "clx...", "assetNumber": "4MET-008", "name": "CNC Mill #3" },
      "assignedTo": { "id": "clx...", "name": "Maria Rodriguez", "email": "[email protected]" },
      "createdBy": { "id": "clx...", "name": "Tom Chen", "email": "[email protected]" },
      "dueDate": "2026-04-20T00:00:00.000Z",
      "startTime": "2026-04-18T08:00:00.000Z",
      "endTime": null,
      "actualDurationMinutes": null,
      "estimatedTimeMinutes": 240,
      "approvedAt": "2026-04-17T14:22:00.000Z",
      "lastCompletedAt": null,
      "createdAt": "2026-04-17T13:10:00.000Z",
      "updatedAt": "2026-04-18T08:05:00.000Z"
    }
  ],
  "pagination": { "limit": 50, "offset": 0, "total": 1247, "hasMore": true }
}

GET /scheduled-maintenance

List preventive maintenance schedules.

ParameterTypeDescription
limitnumberMax records
offsetnumberRecords to skip
updatedSinceISO dateIncremental sync filter
isActiveboolFilter active/inactive schedules
prioritystringFilter by priority
assetIdstringFilter by asset (internal id or assetNumber)
Sample response
{
  "data": [
    {
      "id": "clx...",
      "scheduleId": "SCH-0042",
      "title": "Monthly grease bearings",
      "description": "Lubricate per spec MS-14",
      "frequency": "monthly",
      "scheduleTime": "07:00",
      "dayOfWeek": null,
      "dayOfMonth": 1,
      "isActive": true,
      "priority": "medium",
      "estimatedDurationMinutes": 30,
      "asset": { "id": "clx...", "assetNumber": "4MET-008", "name": "CNC Mill #3" },
      "assignedTo": "clx_user_...",
      "lastRun": "2026-04-01T07:00:00.000Z",
      "nextRun": "2026-05-01T07:00:00.000Z",
      "createdAt": "2024-06-01T12:00:00.000Z",
      "updatedAt": "2026-04-01T07:05:00.000Z"
    }
  ],
  "pagination": { "limit": 50, "offset": 0, "total": 87, "hasMore": true }
}

GET /parts

List parts inventory.

ParameterTypeDescription
limitnumberMax records
offsetnumberRecords to skip
updatedSinceISO dateIncremental sync filter
categorystringFilter by category
lowStockboolIf true, only returns parts where quantityOnHand <= reorderPoint
searchstringMatches partNumber or name (case-insensitive)

Fetch a single part (by internal id or partNumber):

GET /api/external/v1/parts/{id}
Sample response
{
  "data": [
    {
      "id": "clx...",
      "partNumber": "BRG-6205",
      "name": "Ball bearing 6205 2RS",
      "description": "Sealed deep-groove bearing",
      "category": "Bearings",
      "manufacturer": "SKF",
      "unitCost": 12.50,
      "quantityOnHand": 8,
      "reorderPoint": 10,
      "reorderQuantity": 20,
      "location": "Parts Room A - Shelf 3",
      "locationId": null,
      "supplier": "Motion Industries",
      "preferredVendor": { "id": "clx...", "name": "Motion Industries" },
      "photoUrl": null,
      "createdAt": "2024-08-10T12:00:00.000Z",
      "updatedAt": "2026-04-12T10:30:00.000Z"
    }
  ],
  "pagination": { "limit": 50, "offset": 0, "total": 234, "hasMore": true }
}

GET /maintenance-history

List completed maintenance records.

ParameterTypeDescription
limitnumberMax records
offsetnumberRecords to skip
updatedSinceISO dateFilter by createdAt
completedSinceISO dateFilter by completedAt (recommended for sync)
assetIdstringFilter by asset
completedByIdstringFilter by user who completed
Sample response
{
  "data": [
    {
      "id": "clx...",
      "workOrderId": "clx_wo_...",
      "workOrderNumber": "WO-04197",
      "assetId": "clx_asset_...",
      "assetNumber": "4MET-008",
      "completedBy": { "id": "clx...", "name": "Maria Rodriguez", "email": "[email protected]" },
      "completedAt": "2026-04-18T12:45:00.000Z",
      "notes": "Replaced 2 bearings, re-lubricated, test run OK",
      "laborCost": 180.00,
      "laborHours": 3.0,
      "partsCost": 25.00,
      "totalCost": 205.00,
      "downtimeMinutes": 180,
      "createdAt": "2026-04-18T12:50:00.000Z"
    }
  ],
  "pagination": { "limit": 50, "offset": 0, "total": 512, "hasMore": true }
}

GET /users

List users (technicians, managers, admins) in your organization.

ParameterTypeDescription
limitnumberMax records
offsetnumberRecords to skip
rolestringadmin, manager, technician, operator, viewer
Sample response
{
  "data": [
    {
      "id": "clx...",
      "name": "Maria Rodriguez",
      "email": "[email protected]",
      "role": "technician",
      "isActive": true,
      "hourlyRate": 45.00,
      "shift": "day",
      "createdAt": "2024-06-01T12:00:00.000Z"
    }
  ],
  "pagination": { "limit": 50, "offset": 0, "total": 24, "hasMore": false }
}

GET /locations

List locations in your organization.

ParameterTypeDescription
limitnumberMax records
offsetnumberRecords to skip
updatedSinceISO dateIncremental sync filter
isActiveboolFilter active/inactive locations
Sample response
{
  "data": [
    {
      "id": "clx...",
      "name": "Shop Floor - Bay 3",
      "description": "Main machining area",
      "address": "123 Industrial Dr",
      "city": "Springfield",
      "state": "IL",
      "zipCode": "62701",
      "phone": "+1-555-0100",
      "email": null,
      "isActive": true,
      "createdAt": "2024-06-01T12:00:00.000Z",
      "updatedAt": "2024-06-01T12:00:00.000Z"
    }
  ],
  "pagination": { "limit": 50, "offset": 0, "total": 6, "hasMore": false }
}

GET /categories

List asset categories in your organization.

ParameterTypeDescription
limitnumberMax records
offsetnumberRecords to skip
Sample response
{
  "data": [
    {
      "id": "clx...",
      "name": "Machining",
      "description": "CNC and manual machining equipment",
      "createdAt": "2024-06-01T12:00:00.000Z"
    }
  ],
  "pagination": { "limit": 50, "offset": 0, "total": 12, "hasMore": false }
}