Skip to content

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

curl -X POST 'https://capi.phishfort.com/v1/incident/{id}/comment' \
  -H 'accept: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"comment": "This incident requires immediate attention"}'
import requests

incident_id = "abc123efd"
response = requests.post(
    f"https://capi.phishfort.com/v1/incident/{incident_id}/comment",
    headers={
        "accept": "application/json",
        "x-api-key": "YOUR_API_KEY",
    },
    json={"comment": "This incident requires immediate attention"},
)
print(response.json())
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.

Response Example

{
    "message": "You added a new comment on incidentId: abc123efd",
    "id": "abc123efd"
}