C
CalibrationOS API

Quick Start

1. Create an API key in Settings → API Keys

2. Include it as a Bearer token in your requests:

curl https://calibrationos.com/api/v1/equipment \
  -H "Authorization: Bearer cal_your_api_key_here"

Authentication

All API requests require a valid API key passed via the Authorization header using the Bearer scheme.

Authorization: Bearer cal_your_api_key_here

API keys start with the cal_ prefix. Each key has one or more scopes that control access:

ScopeAccess
equipment:readList and view equipment
equipment:writeCreate, update, and retire equipment
calibrations:readList and view calibration records
calibrations:writeCreate and update calibration records
standards:readList and view reference standards
reports:readGenerate and download reports
webhooks:manageCreate, update, and delete webhooks

Equipment

GET/api/v1/equipment

List equipment for your organization. Supports filtering, search, and pagination.

Parameters

searchstringFilter by equipment number, description, or serial number
statusstringFilter by status: active, overdue, in_calibration, retired
categorystringFilter by category: dimensional, electrical, pressure, temperature, etc.
pagenumberPage number (default: 1)
limitnumberItems per page (default: 50, max: 100)

Response

{
  "equipment": [
    {
      "id": "uuid",
      "equipmentNumber": "EQ-2026-0001",
      "description": "Digital Caliper",
      "category": "dimensional",
      "status": "active",
      "lastCalDate": "2026-01-15T00:00:00Z",
      "nextDueDate": "2027-01-15T00:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 26,
    "totalPages": 1
  }
}
POST/api/v1/equipment

Create a new piece of equipment. Automatically generates an equipment number.

Body Parameters

description*stringEquipment description
category*stringEquipment category
serialNumberstringManufacturer serial number
manufacturerstringEquipment manufacturer
modelstringModel number
calFrequencyDaysnumberCalibration interval in days (default: 365)
calTypestringin_house or external

Response

{
  "id": "uuid",
  "equipmentNumber": "EQ-2026-0027",
  "description": "Torque Wrench",
  "category": "torque",
  "status": "active",
  "nextDueDate": "2027-03-18T00:00:00Z"
}
GET/api/v1/equipment/:id

Retrieve a single equipment record with recent calibration history.

PUT/api/v1/equipment/:id

Update equipment fields. Only provided fields are updated.

Body Parameters

descriptionstringUpdated description
statusstringactive, in_calibration, or retired
calFrequencyDaysnumberUpdated calibration interval
locationIdstringUUID of new location

Calibrations

GET/api/v1/calibrations

List calibration records with optional filtering by equipment, date range, and result.

Parameters

equipmentIdstringFilter by equipment UUID
resultstringFilter by result: pass, fail, in_tolerance, out_of_tolerance
startDatestringISO date — filter records on or after this date
endDatestringISO date — filter records on or before this date
pagenumberPage number (default: 1)
limitnumberItems per page (default: 50, max: 100)
POST/api/v1/calibrations

Record a new calibration. Automatically updates equipment status and next due date.

Body Parameters

equipmentId*stringEquipment UUID
calDate*stringISO date of calibration
overallResult*stringpass, fail, in_tolerance, or out_of_tolerance
performedBystringName of calibration technician
asFoundDataobjectAs-found measurement data
asLeftDataobjectAs-left measurement data (after adjustment)
certificateNumberstringExternal certificate number
GET/api/v1/calibrations/:id

Retrieve a single calibration record with full measurement data.

Reference Standards

GET/api/v1/standards

List reference standards with traceability chain information.

GET/api/v1/standards/:id

Retrieve a reference standard with its parent/child traceability chain.

Webhooks

Webhooks deliver real-time event notifications to your endpoint via HTTP POST. All payloads are signed with HMAC-SHA256 for verification.

Available Events

calibration.completedequipment.overdueoot.detectedinvestigation.openedinvestigation.closedequipment.createdequipment.retireddrift.alert

Signature Verification

Each webhook request includes an X-CalOS-Signature header containing a hex-encoded HMAC-SHA256 digest of the raw request body, using your webhook secret as the key.

const crypto = require('crypto');

function verifySignature(body, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(body)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

Payload Format

{
  "event": "calibration.completed",
  "timestamp": "2026-03-18T14:30:00Z",
  "data": {
    "id": "uuid",
    "recordNumber": "CR-2026-0050",
    "equipmentId": "uuid",
    "equipmentNumber": "EQ-2026-0001",
    "overallResult": "pass",
    "calDate": "2026-03-18T00:00:00Z"
  }
}

Errors

The API uses standard HTTP status codes and returns errors in a consistent JSON format:

{
  "error": "Validation failed: description is required"
}
StatusMeaning
400Bad Request — Validation failed or invalid parameters
401Unauthorized — Missing or invalid API key
403Forbidden — Insufficient scope or plan quota exceeded
404Not Found — Resource does not exist or belongs to another tenant
429Too Many Requests — Rate limit exceeded (60 req/min)
500Internal Server Error — Something went wrong on our end