NexaTrack for developers and AI apps
Connect Claude, ChatGPT or your own automation to a construction company's NexaTrack account. Everything here works for every NexaTrack customer the same way.
The addresses
| MCP server (AI apps) | https://nexatrack.cc/mcp |
|---|---|
| REST API | https://nexatrack.cc/api/v1/<operation> |
| OAuth (issuer) | https://nexatrack.cc/mcp, metadata at https://nexatrack.cc/.well-known/oauth-authorization-server/mcp |
| OpenAPI | developers/openapi.json |
The MCP server speaks protocol 2026-07-28 (with server/discover) and the earlier 2025-06-18 handshake.
Connecting
AI apps: OAuth
Add the MCP address as a custom connector. The app is sent to NexaTrack, where the person signs in as themselves and chooses which of their businesses the app may use, and whether it may only read or also make changes. The account owner must have switched AI apps on first.
- OAuth 2.1 with PKCE (
S256only), public clients, rotating refresh tokens. - Clients may identify themselves with a Client ID Metadata Document (preferred) or register dynamically at
/register. A self-registered name is shown to the person as not checked. - Send the
resourceparameter. A token works only at the address it names: the MCP address, or the REST API. - Every
401carriesWWW-Authenticatewithresource_metadata, so a client can find the server by itself.
Automations: API keys
The account owner makes a key in Settings, read only or read and write, for all or some of the businesses, with an optional expiry.
Send it as Authorization: Bearer nt_live_.... A key is shown once; NexaTrack keeps only a fingerprint of it.
Who a connection acts for
A connection or a key acts for one person: the one who connected the app, or the owner who made the key. It sees what that person sees in NexaTrack and can do what their position allows, inside the businesses it was given. A list that comes back empty means the person cannot see it.
Anyone whose position includes "Connect an AI app" can connect one: managers unless the owner changes it, and any other position the owner ticks it for. Switching a person off ends their connections and keys at once. Everything a connection does is recorded, and the owner sees it in Settings under AI activity.
What waits for a person
Anything that would tell a subcontractor or a homeowner, or show them something, is outward. An AI app never does it by itself:
- The call answers 200 with
{"data": {"status": "waiting_for_approval", "pending_action_id": "...", "preview": {...}}}(over MCP, the same object is the tool's result). Nothing is sent. - The person it acts for, or the owner, approves it in NexaTrack. A client that supports URL-mode input requests is given that page directly.
- Read the state with
get_pending_action. Calling the operation again does not approve it. - Items expire after 24 hours unanswered. Declined and expired items send nothing.
- Ordinary writes that would notify an outside person (a Task assigned to a sub) are saved at once; only their message waits. Webhooks receive such an event only after it is approved.
Outward examples: publishing or moving a schedule that is online, answering a Customer Request, sending a Client Update, inviting a
homeowner, notes subs can see, files filed in Plans, Specs, Permits or Contracts. Each operation's risk is named in the OpenAPI file
(x-nexatrack-risk).
The owner can mark one key "may send without approval", for an automation they trust. Nothing an AI app is connected with can be marked so.
What still needs a person
A few steps stay with a person on purpose. For each one that has a page, get_page_link with its step
returns the address of that exact page, who does it and what they do there, so an app can say "tap this" instead of "open
NexaTrack and find it". The page opens once the person is signed in.
| Step | step | Who |
|---|---|---|
| Approving or declining what an AI app asked for | approve_waiting | The person it acts for, or the owner |
| Switching AI apps or sending by AI on, and accepting the AI terms | ai_settings | The owner |
| Restoring what an AI app removed, from AI activity | restore_ai_change | The person |
Reviewing Daily Logs (an AI app a person connected may also mark them reviewed, mark_log_reviewed) | review_logs | The person |
| Answering possible scope creep on a Daily Log | answer_scope_creep | The person |
| Paying a NexaTrack invoice | pay_invoice | The owner |
| Saving a card or bank account | save_payment_method | The owner |
| Connecting a Business's Stripe account for client payments | connect_stripe | The owner |
| Connecting QuickBooks Online | connect_quickbooks | The owner |
Downloading the account export (request_account_export asks for one) | download_export | The owner |
Making an API key by hand (the owner's AI app can ask, request_api_key) | create_api_key | The owner |
Adding a webhook by hand (the owner's AI app can ask, request_webhook) | add_webhook | The owner |
| Accepting, declining or ending a link with another NexaTrack account | linked_account | The owner |
Accepting the referral terms (the owner's AI app can ask to change the code, cash or promotional email, request_referral_change) | referral_settings | The owner |
No page link, because the person does these where they are: signing in, devices and passwords, invitations; clocking in and out
and breaks, on the phone at the place (add_shift and edit_shift correct them); the consent page an AI app
opens when it connects; another person's sign-in email, whose confirm link goes to the new address; and the billing confirmations
the owner opens from an email. The list comes from src/api/action-coverage.ts, where every console and app action
is mapped to an operation or to one of these.
The REST API
Every operation the MCP server offers is also POST https://nexatrack.cc/api/v1/<operation> with its input as the
JSON body. Success answers {"data": ...}; a refusal answers {"error": {"code", "message"}} with its HTTP status.
curl https://nexatrack.cc/api/v1/list_jobs \
-H "Authorization: Bearer $NEXATRACK_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "open"}'
Limits and errors
- Each key or connection has its own rate limit, and each account a ceiling across all of them. A counted request's answer carries
RateLimit-LimitandRateLimit-Remaining; a refusal is429 RATE_LIMITEDwithRetry-Afterin seconds. - An account can have a monthly allowance of requests; past it,
429 QUOTA_EXCEEDED.
| Code | Meaning |
|---|---|
VALIDATION | The input is not right; the message says what. |
FORBIDDEN | The person's role, the key's scope or the business does not allow it. |
NOT_FOUND (404), JOB_NOT_FOUND (400) | It does not exist, or this person cannot see it. |
CONFLICT | An idempotency key reused for a different call, or someone else decided first. |
RATE_LIMITED, QUOTA_EXCEEDED | Wait, or the account has used its allowance. |
INVALID_KEY | No valid key or token (401). |
Retries and idempotency
Send your own idempotency_key (MCP) or Idempotency-Key header (REST) on every write. The same call again with the
same key returns the first result and changes nothing twice, for 24 hours. The same key with a different call is refused with
CONFLICT. A write that failed releases its key, so a corrected retry goes through.
Undo
undo_my_change removes a Task, Schedule Item, Shift, Daily Log or photo that the same app made in the last 24 hours, and
restore_my_change puts it back. A person can restore it too, from AI activity in Settings. Nothing else can be deleted by an AI app.
Webhooks
The owner adds an https address and the events to send in Settings. Each event is one POST with a JSON body:
{ "event_id", "type", "version", "tenant_id", "entity_id", "job_id", "occurred_at", "actor_user_id",
"payload": { ... }, "messages": [ ... ] }
Checking the signature
Each delivery carries X-NexaTrack-Signature: sha256=<hex>, an HMAC-SHA256 of the raw body keyed with the endpoint's
signing secret (shown once, when the webhook is added), and X-NexaTrack-Timestamp. It also carries
X-NexaTrack-Signature-V2, the same HMAC over the timestamp, a full stop and the body: check that one and refuse a timestamp
more than five minutes from your clock, so a copied request does not verify later (the webhooks guide has both checks). Compare in
constant time, against the raw bytes, before parsing:
import { createHmac, timingSafeEqual } from 'node:crypto';
function fromNexaTrack(rawBody, signatureHeader, secret) {
const expected = 'sha256=' + createHmac('sha256', secret).update(rawBody).digest('hex');
const a = Buffer.from(expected), b = Buffer.from(signatureHeader || '');
return a.length === b.length && timingSafeEqual(a, b);
}
Retries, pausing and sending again
- Answer with a
2xxwithin 5 seconds. A timeout, a network error, a5xx, a408or a429is retried after 1, 5 and 25 minutes; any other4xxis not retried. - Deliver at least once: a retry can repeat an event, so de-duplicate on
event_id. - After 20 failures in a row the webhook pauses and the owner is told. Turning it back on in Settings resumes it.
- The last 50 deliveries and their results are in Settings, with Send again for any one.
The event types, and the fields each one carries, are on the events page. The full table of codes and limits is on Errors and limits.
Every operation
The full list, with each input schema, its scope, its risk and a real example, is the reference and the OpenAPI document. It is generated from the same list the MCP server offers, so the two never disagree. A published operation keeps its name and inputs; a breaking change gets a new name.
Use the words on the customer's screen: Schedule Item, Work Days, Predecessor, Lag, Non-workday, Daily Log, Shift, Subs/Vendors, Punch List, Warranty, Plans and Specs.