Developer portal
Create record
Create a new record validated against the module schema.
POST
/api/v1/recordsrecords
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | Header | string | optional | UUID to make retries safe. |
moduleKey | Body | string | required | Target module identifier. |
payload | Body | object | required | Record 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" } }'