Bulk create action items
const url = 'https://safe-api.safetyradar.com/v2/action-items/bulk';const options = { method: 'POST', headers: { 'x-team': 'my-team-slug', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"actionItems":[{"title":"example","description":"example","assignedToUserId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","assignedToUserExternalId":"example","assignedToDepartmentId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","assignedToRoleSlug":"example","dueDate":"2026-04-15T12:00:00Z","priority":"low","status":"open","completedAt":"2026-04-15T12:00:00Z","completedByExternalId":"example","externalId":"example","eventExternalId":"example","locationExternalId":"example","statusExternalId":"example","fields":{"crew":"A-shift","corrective_cost":1250},"metadata":{"additionalProperty":"example"}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://safe-api.safetyradar.com/v2/action-items/bulk \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-team: my-team-slug' \ --data '{ "actionItems": [ { "title": "example", "description": "example", "assignedToUserId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "assignedToUserExternalId": "example", "assignedToDepartmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "assignedToRoleSlug": "example", "dueDate": "2026-04-15T12:00:00Z", "priority": "low", "status": "open", "completedAt": "2026-04-15T12:00:00Z", "completedByExternalId": "example", "externalId": "example", "eventExternalId": "example", "locationExternalId": "example", "statusExternalId": "example", "fields": { "crew": "A-shift", "corrective_cost": 1250 }, "metadata": { "additionalProperty": "example" } } ] }'Create or update multiple action items in a single request (1-100). Each item supports the same fields as the single create: externalId is the item’s own correlation ID and upserts (see action on each result and the created / updated counts in summary), eventExternalId links to an event, locationExternalId / statusExternalId set the asset and status, and fields carries your organization’s custom fields. Per-item errors are returned in results without failing the request — an item whose fields are refused reports the per-key messages in its error and is not written, while the rest of the batch still lands. Each result identifies the item only, so read fields back with GET /action-items/{id}. The team is taken from the X-Team header.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
The organization’s admin-defined custom fields, keyed by definition key. Validated against the organization’s own definitions: an unknown key, a bad enum value or a missing required field is a 400 carrying a per-key list. Does not merge with metadata — the two are stored separately and neither overwrites the other. Discover the contract at GET /v2/modules/action_item/fields.
object
Example
{ "crew": "A-shift", "corrective_cost": 1250}Verbatim, unvalidated. Use fields — typed, admin-defined, validated. See GET /v2/modules/action_item/fields.
object
Responses
Section titled “Responses”Bulk operation completed
object
object
object
object
Example
{ "data": { "results": [ { "action": "created" } ] }}Unauthorized
object
object
Examplegenerated
{ "code": "example", "message": "example", "details": { "additionalProperty": "example" }}
