List a module's records
const url = 'https://safe-api.safetyradar.com/v2/modules/jsa/records?limit=50&includeDeleted=true&updatedAfter=2026-09-01T00%3A00%3A00Z&updatedBefore=2026-09-30T00%3A00%3A00Z&fieldFilters=%5B%7B%22key%22%3A%22hazard_level%22%2C%22op%22%3A%22eq%22%2C%22value%22%3A%22high%22%7D%5D&fieldSort=%7B%22key%22%3A%22hazard_level%22%2C%22direction%22%3A%22desc%22%7D';const options = { method: 'GET', headers: {'x-team': 'my-team-slug', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://safe-api.safetyradar.com/v2/modules/jsa/records?limit=50&includeDeleted=true&updatedAfter=2026-09-01T00%3A00%3A00Z&updatedBefore=2026-09-30T00%3A00%3A00Z&fieldFilters=%5B%7B%22key%22%3A%22hazard_level%22%2C%22op%22%3A%22eq%22%2C%22value%22%3A%22high%22%7D%5D&fieldSort=%7B%22key%22%3A%22hazard_level%22%2C%22direction%22%3A%22desc%22%7D' \ --header 'Authorization: Bearer <token>' \ --header 'x-team: my-team-slug'List the records of a custom module, newest first, paged by an opaque cursor. Removed records are left out unless includeDeleted=true.
Poll for changes with updatedAfter / updatedBefore — exclusive on both ends, the same on every v2 endpoint that takes them. Either one changes the order to updatedAt ascending; page with nextCursor until it is null, then pass the updatedAt of the last record as the next updatedAfter. A write can become visible with an updatedAt a little older than the cursor you already hold, so poll with an overlap: pass updatedAfter = the last updatedAt you saw minus 5 minutes, and de-duplicate on id.
Filter and sort on your organization’s custom fields with fieldFilters and fieldSort — JSON in the query string. A key your organization has not defined, or an operator its type does not accept, is a 400 rather than an ignored filter. GET /v2/modules/{slug}/fields lists the keys, types and the operators each one accepts.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The custom module’s slug, unique within your organization. Core modules (action_item) have their own routes.
Example
jsaThe custom module’s slug, unique within your organization. Core modules (action_item) have their own routes.
Query Parameters
Section titled “Query Parameters”Results per page (default: 50, max: 200). A larger value is refused with a 400 validation_error; it is not clamped.
Example
50Results per page (default: 50, max: 200). A larger value is refused with a 400 validation_error; it is not clamped.
The nextCursor of the previous page, as given. Send it with the same filters and sort: a cursor taken under a different order is refused with a 400.
The nextCursor of the previous page, as given. Send it with the same filters and sort: a cursor taken under a different order is refused with a 400.
Also list removed records (deletedAt set). Default false.
Also list removed records (deletedAt set). Default false.
Only records updated strictly after this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC. Changes the order to updatedAt ascending: page with nextCursor until it is null, then pass the updatedAt of the last record back as the next updatedAfter. Treat the poll as at-least-once and de-duplicate on id.
Example
2026-09-01T00:00:00ZOnly records updated strictly after this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC. Changes the order to updatedAt ascending: page with nextCursor until it is null, then pass the updatedAt of the last record back as the next updatedAfter. Treat the poll as at-least-once and de-duplicate on id.
Only records updated strictly before this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC.
Example
2026-09-30T00:00:00ZOnly records updated strictly before this instant (exclusive). ISO 8601 with Z or a timezone offset (URL-encode + as %2B), normalized to UTC.
JSON array of custom-field filters, ANDed together. Each entry is {“key”,“op”,“value”}; isNull / isNotNull take no value and in takes an array. The operators a field accepts are returned as ops by GET /v2/modules/{slug}/fields.
Example
[{"key":"hazard_level","op":"eq","value":"high"}]JSON array of custom-field filters, ANDed together. Each entry is {“key”,“op”,“value”}; isNull / isNotNull take no value and in takes an array. The operators a field accepts are returned as ops by GET /v2/modules/{slug}/fields.
JSON custom-field sort: {“key”,“direction”} with direction “asc” or “desc” (default “asc”). Records holding no value for the key sort last. Replaces the default order, including the updatedAt order of a poll.
Example
{"key":"hazard_level","direction":"desc"}JSON custom-field sort: {“key”,“direction”} with direction “asc” or “desc” (default “asc”). Records holding no value for the key sort last. Replaces the default order, including the updatedAt order of a poll.
Header Parameters
Section titled “Header Parameters”Deprecated — accepted but ignored; the v2 API is org-scoped.
Example
my-team-slugDeprecated — accepted but ignored; the v2 API is org-scoped.
Responses
Section titled “Responses”A page of records
object
object
The record’s own correlation id, unique per module. The upsert key.
The record’s calendar date as an ISO instant. A date-only value is stored at 08:00 UTC: read its date in UTC.
The organization’s custom fields for this module, keyed by definition key. Always present; a defined key this record holds no value for is absent rather than null. A user (person) or asset (location / equipment) field is read back as { id, name, externalId } in place of its uuid; every other type is its plain value. Discover the keys, types and filter operators at GET /v2/modules/{slug}/fields.
object
Set when the record was removed. A removed record is listed only with includeDeleted=true; sending its external id in a bulk upsert restores it.
object
object
Records matching the filters, all pages.
Pass as cursor for the next page; null on the last one.
Example
{ "data": [ { "externalId": "JSA-00042", "statusGroup": "new", "fields": { "task_steps": "Rig the load; clear the swing radius", "hazard_level": "high", "supervisor": { "id": "5c8d32f1-bf63-432e-a087-9ceeaf86a3b6", "name": "Jordan Lee", "externalId": "EMP-0123" } } } ]}Malformed cursor, fieldFilters or fieldSort, or a key or operator the organization’s definitions refuse
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Missing or invalid API key (unauthorized)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}No custom module with this slug is installed for your organization
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Rate limit exceeded (rate_limit_exceeded)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Unexpected server error (internal_error)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}
