Canonical: https://opspilot.us/api-docs

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.

[Make your first request](#quick-start)[Download OpenAPI](https://opspilot.us/api-reference.json)

documented read endpoints6

standard toolsHTTP + JSON

required to get startedNo SDK

[

## Start with scoped access

Give each script only the workspace permissions it needs.

Explore](#authentication)[

## Use the tools you know

Copy cURL or Node.js examples. No package to install.

Explore](#quick-start)[

## React to the right events

Verify signed notifications before acting on a delivery.

Explore](#webhooks)

## Make your first request

- Sign in to your own workspace. In [Settings → API keys](https://app.opspilot.us/settings/api-keys), an authorized administrator can create a key with the job:read scope. Copy it when shown and store it securely.
- 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.
- 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.

| 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.

## Receive and verify webhooks

- Open [Settings → Webhooks](https://app.opspilot.us/settings/webhooks). Add your HTTPS receiver, choose events, and keep the signing secret in your receiver’s secret store.
- Use GET /webhooks/events for the current catalog. Examples include ticket.created, invoice.paid, and session.ended; the deployment’s catalog is authoritative.
- 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](https://opspilot.us/examples/verify-webhook.mjs)

## 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.

[Download JSON](https://opspilot.us/api-reference.json)

### Node.js quick start

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

[Download example](https://opspilot.us/examples/list-jobs.mjs)

### Webhook verifier

Raw-body HMAC verification with timestamp checks.

[Download verifier](https://opspilot.us/examples/verify-webhook.mjs)

### Prefer a plain-text reference?

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

[Read Markdown](https://opspilot.us/api-docs.md)

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.

[Discuss your integration](https://opspilot.us/contact#contact-form)[Explore connected workflows](https://opspilot.us/integrations)
