Skip to content

Developer resources

Make your nextconnection count.

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.

documented read endpoints
6
standard tools
HTTP + JSON
required to get started
No SDK

Make your first request

  1. Sign in to your own workspace. In Settings → API keys, an authorized administrator can create a key with the job:read scope. Copy it when shown and store it securely.
  2. Set 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.
  3. Run the read-only request below against your own workspace. A successful empty page is valid when no jobs exist.
List jobs with cURL
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'

Example empty jobs response
{
  "jobs": [],
  "total": 0,
  "page": 1,
  "pageSize": 25
}

List jobs with Node.js 18+
// 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.

Authentication and workspace access

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.

Verified endpoint reference

Base URL example: https://api.opspilot.us/api/v1. This is a selected read-only reference, not an exhaustive list of platform endpoints.

Read-only API endpoints and required permissions
Method and pathPurposePermission
GET /jobsList service jobsjob:read
GET /jobs/{id}Read one service jobjob:read
GET /jobs/summaryRead service job summaryjob:read
GET /webhooks/eventsRead the supported event catalogwebhook:read
GET /webhooksList outbound webhook subscriptionswebhook:read
GET /webhooks/{id}/deliveriesRead delivery history for a webhookwebhook: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.

Receive and verify webhooks

  1. Open Settings → Webhooks. Add your HTTPS receiver, choose events, and keep the signing secret in your receiver’s secret store.
  2. Use GET /webhooks/events for the current catalog. Examples include ticket.created, invoice.paid, and session.ended; the deployment’s catalog is authoritative.
  3. Send a test from Settings, then inspect delivery history and response details. Test/retry actions require the corresponding permission and enabled dispatch service.

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.

Verify webhook signatures with Node.js
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.

Download the webhook verification example

Errors, rate limits, and troubleshooting

  • 400: check request fields, query values, and identifier formats.
  • 401: verify that the key or session is valid, unexpired, and not revoked.
  • 403: check scopes, user permissions, workspace membership, and plan requirements. Repeating the same request does not grant access.
  • 404: confirm the route and that the resource belongs to the authenticated workspace.
  • 429: honor Retry-After and reduce concurrent or repeated requests. Limits depend on the endpoint and deployment.
  • 5xx: retain the timestamp and request identifier if supplied, and contact support. Retry reads with bounded backoff; avoid blindly repeating writes.

Do not include secrets or customer payloads in a support request. Send the method, route, status, time, and a redacted error description.

Take the reference with you

Practical files for your own test workspace. These are selected references and templates, not the complete platform API.

OpenAPI reference

Selected read-only endpoints, parameters, and authentication.

Node.js quick start

A scoped jobs request using the built-in fetch API.

Prefer a plain-text reference?

Read the same guide as Markdown, including copyable code and endpoint tables.

Read Markdown

Use your own sandbox or test workspace. The public demo is shared and is not a place to store integration credentials.

Your next step

Have a workflow in mind?

Tell us what you want to connect. We can help you understand the available endpoints and the right place to begin.