Add Comment to Existing Incident
The incident comment endpoint provides a method to add comments to an incident by referencing its id and passing the comment as a JSON object.
Endpoint
POST /v1/incident/{id}/comment
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
comment |
string |
Yes | The comment text to add to the incident. Must be a valid non-null string. |
Warning
The comment field cannot be null. The comment must be a valid non-null string value.
Request Example
const incidentId = "abc123efd";
const response = await fetch(
`https://capi.phishfort.com/v1/incident/${incidentId}/comment`,
{
method: "POST",
headers: {
accept: "application/json",
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
comment: "This incident requires immediate attention",
}),
}
);
const data = await response.json();
console.log(data);
Where {id} is the ID of the incident you wish to add a comment to.