QEHSQEHS

Developer portal

Create record

Create a new record validated against the module schema.

POST/api/v1/records
records

Parameters

NameInTypeRequiredDescription
Idempotency-KeyHeaderstringoptionalUUID to make retries safe.
moduleKeyBodystringrequiredTarget module identifier.
payloadBodyobjectrequiredRecord field values.

Example request body

{ "moduleKey": "incidents", "payload": { "title": "Near-miss" } }

Example response

{ "id": "rec_01J...", "moduleKey": "incidents", "createdAt": "..." }

When to use this endpoint

  • Ingest inspection results from a mobile field app into QEHS.
  • Create incidents programmatically from IoT sensor alerts.
  • Mirror records from an ERP during a one-time migration.

Rate limiting

Supply an Idempotency-Key header on retries — the server caches the response for 24h. Global limits →

Error codes

All endpoints may also return universal errors (401, 403, 429, 500). Error catalog →

Code samples

curl -s -X POST 'https://app.qehsethos.com/api/v1/records' \
  -H 'Authorization: Bearer $QEHS_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "moduleKey": "incidents", "payload": { "title": "Near-miss" } }'

See also