Create a new incident
const url = 'https://api.adversarial.com/api/v1/incidents';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"assigned_to":null,"contained_date":null,"description":"","detected_date":null,"occurred_date":null,"responded_date":null,"severity":null,"severity_reasoning":null,"source":null,"status":null,"title":""}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.adversarial.com/api/v1/incidents \ --header 'Content-Type: application/json' \ --data '{ "assigned_to": null, "contained_date": null, "description": "", "detected_date": null, "occurred_date": null, "responded_date": null, "severity": null, "severity_reasoning": null, "source": null, "status": null, "title": "" }'Request Body
Section titled “Request Body”The required properties of a request to POST /incidents
object
Responses
Section titled “Responses”Incident created
Relationship, core incident information
object
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
Relative path to the user’s avatar endpoint, e.g.
"users/{id}/avatar?v={hash}". None when the user has no avatar.
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
Relative path to the user’s avatar endpoint, e.g.
"users/{id}/avatar?v={hash}". None when the user has no avatar.
When set, this incident is linked under the named parent incident.
Where the incident was reported from (e.g. “Employee Reported”). Always present.
The status of an incident
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
Relative path to the user’s avatar endpoint, e.g.
"users/{id}/avatar?v={hash}". None when the user has no avatar.
Example
{ "id": "INC-00001", "parent_id": "INC-00001", "severity": "SEV-5", "status": "New"}Validation failed (e.g. unknown source, inactive assignee)