OpenAPI reference
Selected read-only endpoints, parameters, and authentication.
Developer resources
From a scoped API key to your first request. Build on real endpoints, copy a working example, and connect the workflows your team depends on.
Give each script only the workspace permissions it needs.
ExploreCopy cURL or Node.js examples. No package to install.
ExploreVerify signed notifications before acting on a delivery.
Explorejob:read scope. Copy it when shown and store it securely.OPSPILOT_API_KEY in your local environment or secret store. The examples use the hosted API origin; replace it with your deployment URL if different.curl --fail-with-body --get \
'https://api.opspilot.us/api/v1/jobs' \
--header "X-API-Key: $OPSPILOT_API_KEY" \
--header 'Accept: application/json' \
--data-urlencode 'page=1' \
--data-urlencode 'pageSize=25'{
"jobs": [],
"total": 0,
"page": 1,
"pageSize": 25
}// Node.js 18 or later. Run on your own trusted workstation/server.
// Set OPSPILOT_API_KEY through your secret store; never commit it.
const base = (
process.env.OPSPILOT_API_BASE ?? 'https://api.opspilot.us/api/v1'
).replace(/\/$/, '');
const key = process.env.OPSPILOT_API_KEY;
if (!key) throw new Error('Set OPSPILOT_API_KEY first.');
const response = await fetch(`${base}/jobs?page=1&pageSize=25`, {
headers: { 'X-API-Key': key, Accept: 'application/json' },
signal: AbortSignal.timeout(15000),
});
if (!response.ok) {
if (response.status === 429)
console.error('Retry-After:', response.headers.get('Retry-After'));
throw new Error(`OpsPilot returned HTTP ${response.status}`);
}
const result = await response.json();
console.log(JSON.stringify(result, null, 2));
Use page and pageSize explicitly when listing jobs. Other resources may use a different response or pagination contract; do not assume one universal envelope.
For server-side scripts, send an API key as X-API-Key. OpsPilot also accepts its API keys through Authorization: Bearer; authenticated session requests can use a bearer JWT. API keys are tied to their workspace and constrained by granted scopes and the owning user’s access.
Create the narrowest key needed, choose an expiry, and revoke unused keys in Settings. Keep keys out of browser bundles, query strings, screenshots, and support messages. Changing a tenant identifier does not grant access to another workspace.
Google or Microsoft sign-in and QuickBooks authorization are provider-specific connections. This reference does not advertise a general delegated OAuth authorization flow for custom OpsPilot clients.
Workspace settings require sign-in and the relevant permission. If the API-key page is unavailable, ask a workspace administrator to grant access or create a suitably scoped key.
Base URL example: https://api.opspilot.us/api/v1. This is a selected read-only reference, not an exhaustive list of platform endpoints.
| Method and path | Purpose | Permission |
|---|---|---|
GET /jobs | List service jobs | job:read |
GET /jobs/{id} | Read one service job | job:read |
GET /jobs/summary | Read service job summary | job:read |
GET /webhooks/events | Read the supported event catalog | webhook:read |
GET /webhooks | List outbound webhook subscriptions | webhook:read |
GET /webhooks/{id}/deliveries | Read delivery history for a webhook | webhook:read |
Replace {id} with the resource’s UUID from your workspace. For automation requiring write operations, confirm the operation’s payload and permission requirements with the team before changing production records.
GET /webhooks/events for the current catalog. Examples include ticket.created, invoice.paid, and session.ended; the deployment’s catalog is authoritative.The JSON envelope contains id, event, timestamp, tenant_id, and event-specific data. The X-Webhook-Signature header has the form t=<unix-seconds>,v1=<hex-digest>. Its HMAC-SHA256 input is the timestamp, a period, and the exact raw request body.
import { createHmac, timingSafeEqual } from 'node:crypto';
// rawBody must be the original request bytes, before parsing JSON.
export function verifyWebhook(rawBody, signature, secret, now = Date.now()) {
if (!secret || !Buffer.isBuffer(rawBody)) return false;
const match = /^t=(\d+),v1=([a-f0-9]{64})$/i.exec(signature ?? '');
if (!match) return false;
const timestamp = Number(match[1]);
if (
!Number.isSafeInteger(timestamp) ||
Math.abs(now / 1000 - timestamp) > 300
)
return false;
const expected = createHmac('sha256', secret)
.update(`${match[1]}.`)
.update(rawBody)
.digest();
const supplied = Buffer.from(match[2], 'hex');
return (
supplied.length === expected.length && timingSafeEqual(supplied, expected)
);
}
Reject invalid signatures and stale timestamps before processing. Do not parse and reserialize JSON before verification. Deduplicate deliveries using X-Webhook-ID, durably accept the work before acknowledging it, and make side effects idempotent: retries can deliver the same notification again. Plan secret rotation with your receiver.
Retry-After and reduce concurrent or repeated requests. Limits depend on the endpoint and deployment.Do not include secrets or customer payloads in a support request. Send the method, route, status, time, and a redacted error description.
Practical files for your own test workspace. These are selected references and templates, not the complete platform API.
Selected read-only endpoints, parameters, and authentication.
A scoped jobs request using the built-in fetch API.
Raw-body HMAC verification with timestamp checks.
Read the same guide as Markdown, including copyable code and endpoint tables.
Use your own sandbox or test workspace. The public demo is shared and is not a place to store integration credentials.
Your next step
Tell us what you want to connect. We can help you understand the available endpoints and the right place to begin.