Skip to content

Create or update an action item

POST
/action-items
curl --request POST \
--url https://safe-api.safetyradar.com/v2/action-items \
--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", "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 an action item, or update an existing one. externalId is the action item’s own correlation ID (unique per organization) and acts as an upsert key: if an action item already carries it, that record is updated with the supplied fields and the response is 200 — otherwise a new item is created and the response is 201. Use eventExternalId to link the item to an event (by the event’s external ID, verified against your org); omit it for a floating action item. locationExternalId sets the location/equipment and statusExternalId sets the status from your organization’s Action Item flow — both are ignored if unrecognised, so check assetName / statusName on the response to confirm what was mapped. statusExternalId takes precedence over status. On the update path the event linkage and the completion fields are ignored. The team is taken from the X-Team header.

Send your organization’s custom fields in fields, keyed by definition key (GET /v2/modules/action_item/fields lists them). They are validated against the organization’s definitions in the same transaction as the record: a refused envelope is a 400 with a per-key list and the item is not created. On the upsert path fields is a partial patch — an omitted key keeps its stored value.

x-team

Deprecated — accepted but ignored; the v2 API is org-scoped.

string
Example
my-team-slug

Deprecated — accepted but ignored; the v2 API is org-scoped.

Media typeapplication/json
object
title
required
string
>= 1 characters
description
string
assignedToUserId
string format: uuid
assignedToUserExternalId
string
assignedToDepartmentId
string format: uuid
assignedToRoleSlug
string
dueDate
string format: date-time
priority
string
Allowed values: low medium high urgent
status
string
Allowed values: open in_progress complete
completedAt
string format: date-time
completedByExternalId
string
externalId
string
>= 1 characters
eventExternalId
string
locationExternalId
string
statusExternalId
string
fields

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
key
additional properties
any
Example
{
"crew": "A-shift",
"corrective_cost": 1250
}
metadata

Verbatim, unvalidated. Use fields — typed, admin-defined, validated. See GET /v2/modules/action_item/fields.

object
key
additional properties
nullable

Existing action item updated (matched on externalId)

Media typeapplication/json
object
data
required
object
id
required
string format: uuid
entityType
required
string
nullable
entityId
required
string format: uuid
nullable
formSubmissionId
required
string format: uuid
nullable
sourceSectionNodeId
required
string
nullable
title
required
string
description
required
string
nullable
assignedToUserId
required
string format: uuid
nullable
assignedToUserName
string
nullable
assignedToDepartmentId
required
string format: uuid
nullable
assignedToRoleSlug
required
string
nullable
dueDate
required
string
nullable
priority
required
string
Allowed values: low medium high urgent
statusId
required
string format: uuid
nullable
statusName
required
string
nullable
statusGroup
required
string
nullable
Allowed values: new in_progress complete on_hold cancelled
status
required
string
Allowed values: open in_progress complete
assetId
required
string format: uuid
nullable
assetName
required
string
nullable
externalId
required
string
nullable
responseNotes
required
string
nullable
attachments
required
Array<object>
nullable
object
key
additional properties
nullable
completedAt
required
string
nullable
completedById
required
string format: uuid
nullable
completedByName
required
string
nullable
createdById
required
string format: uuid
nullable
fields
required

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
key
additional properties
any
metadata
required

Verbatim, unvalidated. Use fields — typed, admin-defined, validated. See GET /v2/modules/action_item/fields.

object
key
additional properties
nullable
organizationId
required
string format: uuid
teamId
required
string format: uuid
nullable
createdAt
required
string
updatedAt
required
string
Example
{
"data": {
"priority": "low",
"statusGroup": "new",
"status": "open",
"fields": {
"crew": "A-shift",
"corrective_cost": 1250
}
}
}

Action item created

Media typeapplication/json
object
data
required
object
id
required
string format: uuid
entityType
required
string
nullable
entityId
required
string format: uuid
nullable
formSubmissionId
required
string format: uuid
nullable
sourceSectionNodeId
required
string
nullable
title
required
string
description
required
string
nullable
assignedToUserId
required
string format: uuid
nullable
assignedToUserName
string
nullable
assignedToDepartmentId
required
string format: uuid
nullable
assignedToRoleSlug
required
string
nullable
dueDate
required
string
nullable
priority
required
string
Allowed values: low medium high urgent
statusId
required
string format: uuid
nullable
statusName
required
string
nullable
statusGroup
required
string
nullable
Allowed values: new in_progress complete on_hold cancelled
status
required
string
Allowed values: open in_progress complete
assetId
required
string format: uuid
nullable
assetName
required
string
nullable
externalId
required
string
nullable
responseNotes
required
string
nullable
attachments
required
Array<object>
nullable
object
key
additional properties
nullable
completedAt
required
string
nullable
completedById
required
string format: uuid
nullable
completedByName
required
string
nullable
createdById
required
string format: uuid
nullable
fields
required

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
key
additional properties
any
metadata
required

Verbatim, unvalidated. Use fields — typed, admin-defined, validated. See GET /v2/modules/action_item/fields.

object
key
additional properties
nullable
organizationId
required
string format: uuid
teamId
required
string format: uuid
nullable
createdAt
required
string
updatedAt
required
string
Example
{
"data": {
"priority": "low",
"statusGroup": "new",
"status": "open",
"fields": {
"crew": "A-shift",
"corrective_cost": 1250
}
}
}

The fields envelope does not satisfy the organization’s definitions

Media typeapplication/json
object
code
required
string
Allowed values: invalid_fields
message
required
string
details
required
object
fields
required
Array<object>
object
key
required
string
message
required
string
Example
{
"code": "invalid_fields"
}

Unauthorized

Media typeapplication/json
object
code
required
string
message
required
string
details
object
key
additional properties
nullable
Examplegenerated
{
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
}
}

Referenced event or assignee not found

Media typeapplication/json
object
code
required
string
message
required
string
details
object
key
additional properties
nullable
Examplegenerated
{
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
}
}

ExternalId is already in use by another action item

Media typeapplication/json
object
code
required
string
message
required
string
details
object
key
additional properties
nullable
Examplegenerated
{
"code": "example",
"message": "example",
"details": {
"additionalProperty": "example"
}
}