Skip to content

Bulk create action items

POST
/action-items/bulk
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, "supervisor": { "id": "5c8d32f1-bf63-432e-a087-9ceeaf86a3b6", "name": "Jordan Lee", "externalId": "EMP-0123" } }, "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.

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
actionItems
required
Array<object>
>= 1 items <= 100 items
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. 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.

object
key
additional properties
any
Example
{
"crew": "A-shift",
"corrective_cost": 1250,
"supervisor": {
"id": "5c8d32f1-bf63-432e-a087-9ceeaf86a3b6",
"name": "Jordan Lee",
"externalId": "EMP-0123"
}
}
metadata

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

object
key
additional properties
nullable

Bulk operation completed

Media typeapplication/json
object
data
required
object
results
required
Array<object>
object
success
required
boolean
id
string format: uuid
eventExternalId
string
externalId
string
action
string
Allowed values: created updated
error
string
summary
required
object
total
required
number
created
required
number
updated
required
number
failed
required
number
Example
{
"data": {
"results": [
{
"action": "created"
}
]
}
}

Invalid request: a parameter or the body failed validation (validation_error), or the body is not valid JSON (invalid_json)

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Unauthorized

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Rate limit exceeded (rate_limit_exceeded)

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Unexpected server error (internal_error)

Media typeapplication/json
object
code
required

Machine-readable error code

string
message
required

Human-readable error message

string
details

Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).

object
key
additional properties
nullable
Example
{
"code": "validation_error",
"message": "Request validation failed"
}

Version bd999fd · Released November 23, 2026