| name | maintainx-webhooks-events |
| description | Implement MaintainX webhook handling and event-driven integrations.
Use when setting up webhooks, handling MaintainX events,
or building real-time integrations with MaintainX.
Trigger with phrases like "maintainx webhook", "maintainx events",
"maintainx notifications", "maintainx real-time", "maintainx triggers".
|
| allowed-tools | Read, Write, Edit, Bash(curl:*), Bash(npm:*) |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","maintainx","webhooks"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
MaintainX Webhooks & Events
Overview
Build real-time integrations with MaintainX using webhooks for work order updates, asset changes, and maintenance notifications. MaintainX fires webhook events when key resources change.
Prerequisites
- MaintainX account with API access
- HTTPS endpoint accessible from the internet (ngrok for local dev)
MAINTAINX_API_KEY environment variable configured
Instructions
Step 1: Register a Webhook
curl -X POST https://api.getmaintainx.com/v1/webhooks \
-H "Authorization: Bearer $MAINTAINX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.example.com/webhooks/maintainx",
"events": [
"workorder.created",
"workorder.updated",
"workorder.status_changed",
"workorder.completed"
]
}'
Step 2: Webhook Receiver (Express)
import express from 'express';
import crypto from 'node:crypto';
const app = express();
app.use(express.json({ limit: '1mb' }));
function verifySignature(secret: string) {
return (req: express.Request, res: express.Response, next: express.NextFunction) => {
const signature = req.headers['x-maintainx-signature'] ;
(!signature) {
res.().({ : });
}
expected = crypto
.(, secret)
.(.(req.))
.();
(!crypto.(.(signature), .(expected))) {
res.().({ : });
}
();
};
}
= process..!;
app.(
,
(),
(req, res) => {
{ event, data, timestamp } = req.;
.();
eventId = req.[] ;
( (eventId)) {
res.().({ : });
}
{
(event, data);
(eventId);
res.().({ : });
} (err) {
.(, err);
res.().({ : });
}
},
);
app.(, .());