Skip to content

Commit a reviewed set of AI-parsed incidents: create them all, tag the batch with the report name, and attach the document they were parsed from, so each incident can be traced back to its source.

POST
/v1/incidents/import/ai/commit
curl --request POST \
--url https://api.adversarial.com/api/v1/incidents/import/ai/commit \
--header 'Content-Type: application/json' \
--data '{ "incidents": [], "source_file_id": null, "tags": [] }'
Media typeapplication/json

Request body for the incident AI import commit step: the (possibly edited) set of incidents the reviewer accepted, plus any tags to apply to the whole batch.

object
incidents

The finalized incidents to create.

Array<object>
default:

A single incident the AI extracted from an uploaded narrative document.

The same shape is returned by the preview call and accepted back on commit, so it carries every field a reviewer may edit before import.

object
description
required

Full narrative description of the incident, grounded in the source document.

string
detected_date

When the incident was detected, as a plain YYYY-MM-DD calendar date taken from the document. null (or anything unparseable) means the document carried no usable date, and the incident falls back to the import time.

string | null
occurred_date

When the incident began, as a plain YYYY-MM-DD calendar date, when the document says. null when it does not.

string | null
rationale
required

One- or two-sentence justification tying the proposal back to the source document.

string
severity
One of:

The severity the source document assigned, mapped onto the SEV scale. null when the document states none; score the incident after import instead.

string
Allowed values: SEV-5 SEV-4 SEV-3 SEV-2 SEV-1
source
required

Suggested intake source (how the incident was reported), chosen from the organization’s configured incident sources — usually the same for every incident in a document.

Reduced server-side to a configured name, or to "" when the model returned something that is not one. Empty means “the AI did not pick a source”, which the reviewer resolves in the preview; on import an empty source takes the organization’s default.

string
source_excerpt
required

A short span copied verbatim from the source document that this incident was drawn from. The client substring-matches it against document_text to scroll to and highlight the originating passage.

string
title
required

Concise incident title.

string
source_file_id

The source_file_id the parse step returned. The document is attached to every created incident, recording where the batch came from. Optional.

string | null format: uuid
tags

Tags (by content) to apply to every imported incident — e.g. the postmortem or report name — so the whole batch can be traced back to its source. Each is created if it doesn’t already exist. Optional.

Array<string>
default:

Incidents created and tagged

Media typeapplication/json

Response from the incident AI import commit step.

object
incidents
required

The created incidents as register rows, in the order they were imported, so the client can drop them straight into its cached register views.

Each carries the source document among its attachments when it was attached. It is not when no source_file_id was sent, or when that id no longer names a document you uploaded for import, such as one already discarded or claimed; the incidents are imported either way.

Array<object>

Register row for an Incident. An Incident plus the relational data shown on the incident register: risk associations, threat objectives, tags, and comment count.

object
attachments
required

Files attached to this incident, newest-first.

Array<object>

A file attached to a risk, an incident, or a comment on either.

Embedded in the attachments list of the record it is attached to, and returned when a file is uploaded to a risk or incident.

object
byte_size

File size in bytes.

integer | null format: int64
content_type
required

MIME content type.

string
created_by

The user who uploaded the file, if known. On a comment’s attachments this can differ from the comment’s author: a comment may reference a file someone else uploaded to the same record.

string | null format: uuid
created_date
required

When the file was uploaded.

string format: date-time
id
required

The attachment’s id; download it with GET /v1/files/{id}.

string format: uuid
name
required

Original file name as uploaded.

string
status
required

The file’s upload status. Attachments are only listed once their upload has finished, so this is always ready.

string
Allowed values: pending ready failed
comment_count
required
integer format: int64
incident
required

Relationship, core incident information

object
assigned_to
One of:

A User as returned by the API.

Profile images are not embedded — clients fetch them from GET /api/v1/{icon} when icon is Some.

object
email
required
string
first_name
required
string
icon

Relative path to the user’s avatar endpoint, e.g. "users/{id}/avatar?v={hash}". None when the user has no avatar.

string | null
id
required
string format: uuid
last_name
required
string
contained_date
string | null format: date-time
created_date
required
string format: date-time
description
required
string
detected_date
required
string format: date-time
id
required
string
occurred_date
string | null format: date-time
opened_by
required

A User as returned by the API.

Profile images are not embedded — clients fetch them from GET /api/v1/{icon} when icon is Some.

object
email
required
string
first_name
required
string
icon

Relative path to the user’s avatar endpoint, e.g. "users/{id}/avatar?v={hash}". None when the user has no avatar.

string | null
id
required
string format: uuid
last_name
required
string
parent_id

When set, this incident is linked under the named parent incident.

string | null
responded_date
string | null format: date-time
severity
One of:
string
Allowed values: SEV-5 SEV-4 SEV-3 SEV-2 SEV-1
severity_reasoning
string | null
source
required

Where the incident was reported from (e.g. “Employee Reported”). Always present.

string
status
required

The status of an incident

string
Allowed values: New In Progress Review Closed
title
required
string
updated_by
required

A User as returned by the API.

Profile images are not embedded — clients fetch them from GET /api/v1/{icon} when icon is Some.

object
email
required
string
first_name
required
string
icon

Relative path to the user’s avatar endpoint, e.g. "users/{id}/avatar?v={hash}". None when the user has no avatar.

string | null
id
required
string format: uuid
last_name
required
string
updated_date
required
string format: date-time
linked_children_count
required

Number of incidents linked under this incident (i.e. children pointing at it). An incident is itself a linked child when incident.parent_id is set.

integer format: int64
risk_associations
required
Array<string>
tags
required
Array<object>
object
content
required
string
creator_id
required
string format: uuid
id
required
string format: uuid
org_id
string | null format: uuid
threat_objectives
required
Array<object>

A threat objective paired with how relevant it is to a risk.

Two relations are considered the same when the objective and its relevance match; created_date records when the relation was last changed and is not part of its identity.

object
created_date

The time that this relation was mutated

string | null format: date-time
relevance
One of:

How relevant the threat objective is. Responses always carry a relevance. In a request, null removes the objective.

string
Allowed values: Moderate Substantial
threat_objective
required

The threat objective type

string
Allowed values: Sabotage Data Disclosure Extortion Customer Targeting Resource Hijacking Fraud
incidents_imported
required

Number of incidents created.

integer format: int64
tags
required

The tags applied to the imported batch.

Array<string>
Example
{
"incidents": [
{
"attachments": [
{
"status": "pending"
}
],
"incident": {
"id": "INC-00001",
"parent_id": "INC-00001",
"severity": "SEV-5",
"status": "New"
},
"threat_objectives": [
{
"relevance": "Moderate",
"threat_objective": "Sabotage"
}
]
}
]
}

No incidents to import, too many, or a source that is not one of the organization’s incident sources

Tags were requested without tags:write