Update action item
const url = 'https://safe-api.safetyradar.com/v2/action-items/123e4567-e89b-12d3-a456-426614174000';const options = { method: 'PATCH', headers: { 'x-team': 'my-team-slug', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"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","statusExternalId":"example","locationExternalId":"example","externalId":"example","responseNotes":"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 PATCH \ --url https://safe-api.safetyradar.com/v2/action-items/123e4567-e89b-12d3-a456-426614174000 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-team: my-team-slug' \ --data '{ "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", "statusExternalId": "example", "locationExternalId": "example", "externalId": "example", "responseNotes": "example", "fields": { "crew": "A-shift", "corrective_cost": 1250 }, "metadata": { "additionalProperty": "example" } }'Partially update an action item by UUID; omitted fields are left unchanged. Supply statusExternalId to move it to a status in the organization’s Action Item flow, or locationExternalId to set the location/equipment. Unrecognised external IDs are ignored rather than rejected — check statusName / assetName on the response to confirm what was mapped. externalId renames the item’s own correlation ID and returns 409 if another action item already holds that value. To update by correlation ID instead of UUID, POST to /action-items with an externalId that already exists.
fields is a partial patch of your organization’s custom fields: only the keys you send are written, an omitted key keeps its stored value, and null on a key clears it. A refused envelope is a 400 with a per-key list and nothing is written.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Action item UUID
Example
123e4567-e89b-12d3-a456-426614174000Action item UUID
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
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. A PARTIAL patch: only the keys sent are written, an omitted key leaves its stored value alone, and null clears one.
object
Example
{ "crew": "A-shift", "corrective_cost": 1250}Verbatim, unvalidated. Use fields — typed, admin-defined, validated. See GET /v2/modules/action_item/fields. Replaces the stored bag wholesale rather than merging into it.
object
Responses
Section titled “Responses”Updated action item
object
object
object
The organization’s custom module fields, keyed by definition key. Always present; {} when the organization has configured none, and a defined key this item holds no value for is absent rather than null. Discover the keys, types and filter operators at GET /v2/modules/action_item/fields.
object
Verbatim, unvalidated. Use fields — typed, admin-defined, validated. See GET /v2/modules/action_item/fields.
object
Example
{ "data": { "priority": "low", "statusGroup": "new", "status": "open", "fields": { "crew": "A-shift", "corrective_cost": 1250 } }}Validation error, or a fields envelope the organization’s definitions refuse (code: invalid_fields, with the per-key list under details.fields)
Unauthorized
object
object
Examplegenerated
{ "code": "example", "message": "example", "details": { "additionalProperty": "example" }}Action item not found
object
object
Examplegenerated
{ "code": "example", "message": "example", "details": { "additionalProperty": "example" }}ExternalId is already in use by another action item
object
object
Examplegenerated
{ "code": "example", "message": "example", "details": { "additionalProperty": "example" }}
