Developers
OpsVara Developer API
Read your company's customers, sites, jobs, quotes, contracts, invoices, inventory and leads from your own tools. Included on Crew, Fleet and Enterprise, and available on Launch as an add-on.
Get a key
- A company admin opens Settings → Integrations → Developer API and clicks Create Key.
- Pick only the permissions the tool needs, and the role it acts as.
- Copy the key. It is shown once. Revoke it from the same screen at any time.
curl "https://api.opsvara.com/api/ext/v1/jobs?from=2026-12-01&to=2026-12-07" \ -H "Authorization: Bearer ovk_live_..."
How it behaves
- Every response is limited to the key's company. A key never sees more than the role it acts as, including your Roles & Access settings.
- Keys are for servers. Never put one in a web page or an app you hand out: anyone who has it can read what it can. Browsers cannot call the API.
- Lists return the most recently changed records first, up to 200 at a time (
limit). For the next page, sendmeta.nextCursorascursorwith the same other parameters. - An unknown, misspelled, repeated or empty parameter is a 400 that says what is wrong, never a silently unfiltered list. Leave a filter out to not use it.
Keeping a copy in sync
- Ask with
updatedSince: records then come oldest change first. The first time, useupdatedSince=1970-01-01to read everything. - Follow
meta.nextCursoruntil it isnull, then remember the newestupdatedAtyou received, ormeta.serverTimeif that is earlier. - Next time, ask from a few minutes before that time, and skip any record you already have with the same
idandupdatedAt. A save that takes a moment can land just behind one you already read; asking from exactly the newest time would miss it.
A sync also lists what the app hides by default (archived leads, deactivated inventory items), so you see the change that hid them. Deleted records are not reported. Jobs on an archived site leave /jobs, as in the app. A site's lastVisitDate and a contract's nextVisitDate come from its jobs: completing or booking a visit does not change the site or contract, so sync /jobs as well to keep them current.
Dates, money and names
- Calendar dates (due dates, contract dates, a visit's
scheduledDay) areYYYY-MM-DDin your company's calendar. Times are ISO 8601 in UTC. - In a query, a plain
YYYY-MM-DDis read in your company's time zone, and a time must include its zone. Send a+offset as%2B, or useZ. - Amounts are US dollars. A quote's
subtotal + taxAmount = total, as its page shows it; each line says whether it counts. - For overdue invoices use
overdue=true(money owed, due date before today in your company's calendar): thepast_duestatus is set only when your company runs invoice aging. /megives the plan's code (starteris Crew,professionalis Fleet) and its name.
Limits and keys
- Up to 300 requests a minute per key. Each response carries
RateLimit-RemainingandRateLimit-Reset(seconds), so you can slow down before a 429. - Monthly, per company, starting over on the 1st (UTC): Launch 25,000, Crew 50,000, Fleet 250,000, Enterprise unlimited. Every accepted request counts, including ones answered with a 400 or 404.
X-Monthly-Requests-Remainingshows what is left. - Every 429 has a Retry-After header.
- A key stops working (401) when it is revoked or expires, and when the admin who made it changes their password, signs out of all devices, stops being a company admin or is deactivated. Settings → Integrations shows why; make a new key.
- Reads of quotes, contracts and invoices appear in Settings → Security → Access log under the key's name.
Connect an AI assistant
OpsVara has a read-only connector (an MCP server) for assistants such as Claude and Cursor. The assistant signs in as a connection a company admin approves, or uses one of your API keys. Either way it sees only your company, only what its permissions and role allow, and it cannot change anything. Its requests count toward the same limits as the API.
Claude and ChatGPT: sign in, no key
- In Claude, find OpsVara in the connector directory (Customize → Connectors). In ChatGPT, find it under Plugins. Click Connect. Or add a custom connector with this address:
https://api.opsvara.com/mcp - A company admin signs in to OpsVara when asked, picks what the assistant may read and the role it acts as, enters their OpsVara password and clicks Allow.
- Ask a question, for example "What is on the schedule tomorrow?"
- Only Claude, ChatGPT and Claude Code can connect this way. Every other tool uses an API key.
- A connection lasts 90 days, or 30 days without use, then a company admin signs in again.
- It stops when the admin who approved it changes their password, signs out of all devices, stops being a company admin or is deactivated, and when the company no longer has the Developer API.
- Every company admin is emailed when an assistant is connected. Any of them can disconnect it in Settings → Integrations, under Connected Assistants.
- For builders: OAuth 2.1 with PKCE (S256), public clients only. Discovery is at
https://api.opsvara.com/.well-known/oauth-authorization-server. Access tokens last 60 minutes and work only on the connector address.
Other assistants and developer tools: use a key
- Create a key just for the assistant, with only the permissions it needs.
- Add the connector address below in the assistant, with the key as a Bearer token in the
Authorizationheader. - Ask a question, for example "What is on the schedule tomorrow?" or "Which invoices are overdue?"
# Claude Code
claude mcp add --transport http opsvara https://api.opsvara.com/mcp \
--header "Authorization: Bearer ovk_live_..."
# Claude Desktop, Cursor and other apps that read an mcpServers file
{
"mcpServers": {
"opsvara": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.opsvara.com/mcp",
"--header", "Authorization:${AUTH_HEADER}"],
"env": { "AUTH_HEADER": "Bearer ovk_live_..." }
}
}
}- The assistant is offered only the tools its key has permission for: customers, sites, jobs and the day's schedule, visit summaries, quotes, contracts, invoices, inventory and leads.
- Up to 120 requests a minute per key. Lists come 25 at a time, up to 100.
- With a key, the connector needs an app that can send it in a header. The Claude and ChatGPT websites cannot, which is why they sign in instead.
- What the assistant reads goes to the company that runs it, under your own agreement with them. Revoke the key, or disconnect the assistant, in Settings → Integrations to disconnect it.
Webhooks
Instead of asking the API over and over whether something changed, give OpsVara an address and it sends your tool a message when it happens. A company admin adds the address in Settings → Integrations → Developer API, under Webhooks, picks the events, and copies the signing secret. The secret is shown once.
Events
| Event | Sent when | data is |
|---|---|---|
job.scheduled | A job is created, by the office, the mobile app or automatic scheduling. Not sent when a job is later rescheduled or edited. | GET /jobs/{id} |
job.completed | A job's status becomes completed. Sent again only if the job is reopened and completed again. | GET /jobs/{id} |
invoice.sent | A draft invoice is sent. Sent again only if the invoice is put back to draft and sent again. | GET /invoices/{id} |
invoice.paid | An invoice's balance reaches zero and its status becomes paid. Sent again only if a payment is removed or refunded and the invoice is paid again. | GET /invoices/{id} |
quote.approved | A customer approves a quote, or the office records the customer's approval. | GET /quotes/{id} |
lead.created | A lead is created, from the lead board, your website form, a field worker or the phone line. Needs Sales Pipeline. | GET /leads/{id} |
Send Test in Settings sends a ping event, so you can check your tool before real events arrive.
What you receive
A POST with a JSON body. data is the record exactly as the API returns it from the endpoint in the table, as it was when the event was sent. Your address belongs to one company, so the body carries no company id.
POST /webhooks/opsvara HTTP/1.1
Content-Type: application/json
User-Agent: OpsVara-Webhooks/1.0
OpsVara-Event: job.completed
OpsVara-Delivery: 6744a1c2f0e4b12d9c0a7e55
OpsVara-Signature: t=1795536000,v1=5d3f...9a1c
{
"id": "0b9d6c1e-6f0a-4a36-9a51-2f7c1d0e8b44",
"type": "job.completed",
"createdAt": "2026-11-24T18:40:00.000Z",
"data": {
"id": "6741f0b2a3c4d5e6f7a8b9c0",
"jobNumber": "JOB-2026-01842",
"status": "completed",
"customerId": "66f1a2b3c4d5e6f7a8b9c0d1",
"siteId": "66f1a2b3c4d5e6f7a8b9c0d2",
"scheduledDay": "2026-11-24",
"checkOutTime": "2026-11-24T18:39:41.000Z",
"...": "the other fields of GET /jobs/{id}"
}
}idis the event's id. It is the same on every retry and on a redelivery: if your tool has already handled that id, answer 200 and do nothing.OpsVara-Deliveryidentifies one delivery to one address. A redelivery has a new one.- Events can arrive out of order, and more than once. Use
createdAtand the record'supdatedAtto tell which is newer. - OpsVara sends one event when the same change is saved twice within 10 seconds, but two close saves can still reach you as two events with different ids. Treat the same
typeanddata.idwithin a short time as one occurrence. datais the record when the event is sent, a moment after the change. A job created already completed sendsjob.completed, notjob.scheduled.- The address must be
https://on the standard port, reachable from the internet. Addresses on a private network are refused. A company can have 10 endpoints, each with a different address.
Check the signature
Anyone can send a request to your address, so check each one came from OpsVara before you trust it. The OpsVara-Signature header is t= (when it was sent, in seconds) and v1=: an HMAC-SHA256 of t, a dot and the exact body, made with your signing secret. Compute the same value over the raw body, before any JSON parsing, and refuse a request that is more than five minutes old.
const crypto = require('crypto');
const express = require('express');
const SECRET = process.env.OPSVARA_WEBHOOK_SECRET; // whsec_...
const TOLERANCE_SECONDS = 300;
function isFromOpsVara(rawBody, header) {
const parts = Object.fromEntries(String(header || '').split(',').map(p => p.split('=')));
const sentAt = Number(parts.t);
if (!Number.isFinite(sentAt)) return false;
if (Math.abs(Date.now() / 1000 - sentAt) > TOLERANCE_SECONDS) return false;
const expected = crypto.createHmac('sha256', SECRET).update(sentAt + '.' + rawBody).digest();
const received = Buffer.from(String(parts.v1 || ''), 'hex');
return received.length === expected.length && crypto.timingSafeEqual(received, expected);
}
const app = express();
// The raw body: the signature is over the exact bytes that were sent.
app.post('/webhooks/opsvara', express.raw({ type: 'application/json' }), (req, res) => {
const rawBody = req.body.toString('utf8');
if (!isFromOpsVara(rawBody, req.get('OpsVara-Signature'))) return res.sendStatus(400);
const event = JSON.parse(rawBody);
// Answer first, work after: OpsVara waits 10 seconds.
res.sendStatus(200);
handle(event);
});Limits
- OpsVara makes at most 2 requests to one address at a time. Answer quickly and do the work afterwards, or deliveries queue up behind the slow ones.
- After 5 failed attempts in a row, an address is not tried for 60 seconds. An attempt due in that time is recorded as failed without a request, and is retried on the schedule below.
- A company can have 600 deliveries a minute across all its addresses. A delivery past that is not sent: it shows as Skipped in Settings, where Redeliver sends it. Use
updatedSinceon the API to catch up after a large change.
Retries
- Any 2xx answer within 10 seconds counts as delivered. Anything else, including a redirect, is a failed attempt. Redirects are not followed.
- A failed delivery is tried again after 1 minute, 5 minutes, 30 minutes, 2 hours, 12 hours, 24 hours and 24 hours: 8 attempts in all, each wait counted from the attempt before it. After that it is marked failed and not tried again.
- Settings shows the 25 most recent deliveries to an address, each with its attempts, and keeps them for 30 days. Redeliver sends one again while the address is on.
- If every delivery to an address fails for 7 days, and at least 5 deliveries failed in that time, OpsVara turns that address off and tells your company admins. Fix the receiver, send a test, then turn it back on in Settings. Events from while it was off are not sent later: use
updatedSinceon the API to catch up. - An address stops receiving when the admin responsible for it (whoever added it, or last saved its address or rolled its secret) is deactivated, stops being a company admin, changes their password or signs out of all devices. Settings shows it as Stopped until another admin takes it over.
- Roll Secret in Settings gives an address a new secret. The old one stops at once.
Permissions
customers:read | Customers |
sites:read | Sites |
jobs:read | Jobs and visit summaries; the day's route for office roles or with the Dispatch bundle |
quotes:read | Quotes (office roles) |
contracts:read | Service contracts (roles your company gives Sales and Billing) |
invoices:read | Invoices (roles your company gives Sales and Billing) |
inventory:read | Inventory items (needs Inventory on the plan) |
leads:read | Leads (office roles; needs Sales Pipeline) |
Endpoints
GET /meThe company and the key or session making the request.GET /glossaryThis company's vertical, terminology, work types and status values.GET /openapi.jsonThis document. Public; no key needed.GET /customersList customers.(customers:read)GET /customers/{id}Get a customer.(customers:read)GET /customers/{id}/sitesList a customer's sites.(sites:read)GET /sitesList sites.(sites:read)GET /sites/{id}Get a site.(sites:read)GET /jobsList jobs. Jobs on archived sites are left out, as in the app (GET /jobs/{id} still returns them).(jobs:read)GET /jobs/{id}Get a job.(jobs:read)GET /jobs/{id}/visit-summaryA job with what the visit applied.(jobs:read)GET /schedule/dayOne day's visits as the route planner orders them. With workerId, that worker's day in route order; without, each worker's stops together, unassigned last. Needs the Jobs bundle, and an office role or the Dispatch bundle.(jobs:read)GET /quotesList quotes. Office roles.(quotes:read)GET /quotes/{id}Get a quote. Office roles.(quotes:read)GET /contractsList service contracts. Roles with Sales and Billing.(contracts:read)GET /contracts/{id}Get a service contract. Roles with Sales and Billing.(contracts:read)GET /invoicesList invoices. Roles with Sales and Billing.(invoices:read)GET /invoices/{id}Get an invoice. Roles with Sales and Billing.(invoices:read)GET /inventory/itemsList inventory items. Needs Inventory on the plan.(inventory:read)GET /inventory/items/{id}Get an inventory item.(inventory:read)GET /leadsList leads. Needs Sales Pipeline; office roles.(leads:read)GET /leads/{id}Get a lead. Needs Sales Pipeline; office roles.(leads:read)
Full schema: openapi.json