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,"supervisor":{"id":"5c8d32f1-bf63-432e-a087-9ceeaf86a3b6","name":"Jordan Lee","externalId":"EMP-0123"}},"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, "supervisor": { "id": "5c8d32f1-bf63-432e-a087-9ceeaf86a3b6", "name": "Jordan Lee", "externalId": "EMP-0123" } }, "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 statusExternalId / assetExternalId 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. A user or asset field takes the record’s uuid, or the { id, name, externalId } object a GET returns it as (only id is read). 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, "supervisor": { "id": "5c8d32f1-bf63-432e-a087-9ceeaf86a3b6", "name": "Jordan Lee", "externalId": "EMP-0123" }}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. A user (person) or asset (location / equipment) field is read back as an ActionItemFieldReference — { id, name, externalId } — in place of its uuid, so you can map it to your own records without a lookup; every other type is its plain value. 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, "supervisor": { "id": "5c8d32f1-bf63-432e-a087-9ceeaf86a3b6", "name": "Jordan Lee", "externalId": "EMP-0123" } } }}Validation error, or a fields envelope the organization’s definitions refuse (code: invalid_fields, with the per-key list under details.fields)
object
object
object
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": "invalid_fields"}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"}Action item not found
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"}ExternalId is already in use by another action item
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"}
