Getting started
The Nexa API
Read and write your maintenance data from your own systems. One REST API over assets, work orders, technicians and spare parts, authenticated with a key you create yourself, plus signed webhooks so you do not have to poll.
Everything the Nexa portal does with your data, this API can do too. It is the same services behind both, so an operation opened through the API is indistinguishable from one a supervisor opened by hand — it appears on the calendar, reaches the technician’s phone, and counts toward the same KPIs.
What you can build
- ERP synchronisation. Push your equipment master data into Nexa and keep it in step, so the register your maintenance team works from is the one your finance team owns.
- Automated work orders. Have a monitoring system, a helpdesk or a building management system open an operation the moment something needs attention, rather than waiting for somebody to notice and type it in.
- Reporting and BI. Pull completed operations, downtime and spare-part movements into your own warehouse and report on them beside everything else.
- Custom interfaces. A kiosk on the shop floor, a tablet view for a specific line, or an internal tool that fits how one plant actually works.
Quickstart
Five minutes, assuming you have a Nexa account on an Enterprise plan.
- Create a key. In the Nexa portal, go to Settings → API keys and press Create key. Only a business owner can do this. Start with read-only scopes; you can widen them later.
- Copy the secret. It is shown once and never again. If you lose it, rotate the key to get a new one.
- Check it works. The
/meendpoint tells you which business the key belongs to and what it may do — the fastest way to confirm you are pointed at the right place.
export NEXA_API_KEY="nxa_live_..."
curl https://nexa.com.tn/api/v1/me \
-H "Authorization: Bearer $NEXA_API_KEY"const response = await fetch("https://nexa.com.tn/api/v1/me", {
headers: {
Authorization: `Bearer ${process.env.NEXA_API_KEY}`,
},
});
const { data } = await response.json();
console.log(data.business_id, data.scopes);import os
import requests
response = requests.get(
"https://nexa.com.tn/api/v1/me",
headers={"Authorization": f"Bearer {os.environ['NEXA_API_KEY']}"},
)
response.raise_for_status()
data = response.json()["data"]
print(data["business_id"], data["scopes"])Then fetch something real. This lists your machines, newest first:
curl "https://nexa.com.tn/api/v1/assets?category=production_machine&limit=10" \
-H "Authorization: Bearer $NEXA_API_KEY"const response = await fetch(
"https://nexa.com.tn/api/v1/assets?category=production_machine&limit=10",
{ headers: { Authorization: `Bearer ${process.env.NEXA_API_KEY}` } },
);
const { data, pagination } = await response.json();
for (const asset of data) {
console.log(asset.reference, asset.name, asset.status);
}
// Keep going while pagination.has_more, passing pagination.next_cursor back
// as ?cursor= — see Conventions › Pagination.import os
import requests
response = requests.get(
"https://nexa.com.tn/api/v1/assets",
params={"category": "production_machine", "limit": 10},
headers={"Authorization": f"Bearer {os.environ['NEXA_API_KEY']}"},
)
response.raise_for_status()
body = response.json()
for asset in body["data"]:
print(asset["reference"], asset["name"], asset["status"])Resources
Eight resources. Assets and operations are what most integrations are about; the rest support them.
- AssetsEquipment, machines and installed items — the register everything else points at.
- OperationsWork orders — create them, assign them, move them, call them off.
- BuildingsSites and buildings — the top of the facility hierarchy.
- FloorsLevels within a building.
- RoomsRooms and zones — where an asset actually is.
- TechniciansYour maintenance team, and who can be assigned work.
- Spare partsInventory, stock levels and every movement in and out.
- WebhooksRead your registered endpoints and what happened to each delivery.
How it fits together
Four things to read next, roughly in this order:
- Authentication — creating a key, what scopes mean, and how to rotate without an outage.
- Conventions — the response envelope, pagination, errors, rate limits and idempotency. Read this before you write a client; it is the part that saves you the most time.
- API reference — every endpoint, with runnable samples.
- Webhooks — how to stop polling, and how to verify that a delivery really came from us.
The machine-readable spec lives at /api/v1/openapi.json. It needs no key, and you can generate a client in your own language from it.