Errors and limits
Error responses
Section titled “Error responses”Errors use standard HTTP status codes. Every error body has this shape:
{ "code": "not_found", "message": "Event '123e4567-e89b-12d3-a456-426614174000' not found", "details": {}}codeis a stable, machine-readable string. Use it in your code.messageis a human-readable explanation. It can change, so don’t parse it.detailsis optional and holds extra information for some errors.
Status codes
Section titled “Status codes”| Status | code |
Meaning |
|---|---|---|
200 OK / 201 Created |
— | The request succeeded. |
204 No Content |
— | The request succeeded and there is no body (for example, deleting an event). |
400 Bad Request |
validation_error, invalid_json, invalid_fields, bad_request |
The request is invalid: a missing or wrong field, a bad query parameter, a body that isn’t valid JSON, or a value that breaks a rule. See Validation errors. |
401 Unauthorized |
unauthorized |
The API key is missing, malformed, revoked or expired. See Authentication. |
404 Not Found |
not_found |
The record doesn’t exist in your organization. |
409 Conflict |
conflict |
The request clashes with existing data, for example an externalId that is already used by another record, or deactivating an asset that still has active child assets. |
429 Too Many Requests |
rate_limit_exceeded |
You sent too many requests. See Rate limit. |
500 Internal Server Error |
internal_error |
Something went wrong on our side. Retry later; if it keeps happening, contact support with the X-Request-Id. |
502 Bad Gateway |
proxy_error |
The API was briefly unreachable. Retry with a backoff. |
Validation errors
Section titled “Validation errors”When a query parameter, path parameter or request body doesn’t match what the endpoint
accepts (a missing required field, a string where a number is required, a limit above the
maximum), the API returns 400 with the code validation_error. details.issues lists
every problem, not only the first, so you can fix them all at once:
{ "code": "validation_error", "message": "Request validation failed", "details": { "issues": [ { "location": "query", "path": "limit", "message": "Too big: expected number to be <=100" } ] }}Each issue has:
location: where the value was sent:query,param(the URL path),headerorjson(the request body).path: the field, with dots between the levels of a nested field. It is empty when the problem is with the value as a whole rather than one field.message: what is wrong, in plain text. Like the top-levelmessage, it can change.
Other 400 codes:
invalid_json: the request body is not valid JSON, for example a trailing comma or a missing quote.invalid_fields: one or more of your organization’s custom fields infieldswere refused.details.fieldslists each one as{ "key", "message" }.bad_request: the request is well-formed but breaks a rule, for example a parent assetexternalIdthat doesn’t exist, or a custom-field filter your organization doesn’t accept.messagesays what.
Rate limit
Section titled “Rate limit”Each API key can make 300 requests per minute. Requests without a valid key are limited to 60 per minute per IP address. The count resets at the start of each minute. The limit is approximate, so don’t plan on using the last few requests of a minute.
Every response includes:
| Header | Meaning |
|---|---|
X-RateLimit-Limit |
Requests allowed per minute (300 with an API key). |
X-RateLimit-Remaining |
Requests left in the current minute. |
When you go over the limit, the API returns 429 Too Many Requests with a Retry-After
header (in seconds):
{ "code": "rate_limit_exceeded", "message": "Too many requests. Limit is 300 per 60s. Retry after 12s."}The request was not processed. Wait for the number of seconds in Retry-After, then send
the same request again before moving on to the next record.
async function safetyRadarFetch(url, options, attempts = 3) { const res = await fetch(url, options); if (res.status === 429 && attempts > 1) { const seconds = Number(res.headers.get('Retry-After') ?? 60); await new Promise((resolve) => setTimeout(resolve, seconds * 1000)); return safetyRadarFetch(url, options, attempts - 1); } return res;}import timeimport requests
def safety_radar_get(url, attempts=3, **kwargs): res = requests.get(url, **kwargs) if res.status_code == 429 and attempts > 1: time.sleep(int(res.headers.get("Retry-After", 60))) return safety_radar_get(url, attempts - 1, **kwargs) return resTo stay under the limit:
- Use the bulk endpoints (
POST /events/bulk,/assets/bulk,/users/bulk,/action-items/bulk) to create or update many records in one request. A bulk request counts as one request against the limit. - Poll for changes with
updatedAfterinstead of re-reading whole lists. See Pagination and polling. - Use a larger
limitto fetch more records per request, up to the endpoint’s maximum (see Pagination and polling).
Request limits
Section titled “Request limits”| Limit | Value |
|---|---|
| Records per bulk request: events, assets, users | 1 to 1,000 |
| Records per bulk request: action items | 1 to 100 |
Records per page (limit) |
Depends on the endpoint, up to 1,000. See Pagination and polling. |
| Request body format | JSON only, with Content-Type: application/json. A body that isn’t valid JSON returns 400 with invalid_json. |
Retrying safely
Section titled “Retrying safely”Requests are not automatically deduplicated. If a POST times out, retrying it can create
the record twice. To make retries safe, set an externalId on the records you create: a
second create with the same externalId returns 409 Conflict instead of a duplicate, and
the bulk endpoints update records by externalId.

