Skip to main content
POST
/
v1
/
investigation
/
{incidentId}
/
feedback
Submit investigation feedback
curl --request POST \
  --url https://api.example.com/v1/investigation/{incidentId}/feedback \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "rating": 123,
  "rootCauseAccurate": true,
  "recommendationsUseful": true,
  "comment": "<string>",
  "correctedRootCause": "<string>"
}
'

Overview

Submits human feedback on a completed investigation. Feedback is used to reinforce correct analyses, correct errors, and improve the AI’s accuracy for future incidents of a similar type. Required role: admin or member

Request headers

Authorization
string
required
JWT Bearer token. Format: Bearer <your-jwt>.

Path parameters

incidentId
string
required
The incident ID for which you are submitting feedback. Example: inc_EXAMPLE_01JX.

Request body

rating
integer
required
Overall quality rating from 1 (poor) to 5 (excellent).
rootCauseAccurate
boolean
required
Whether the AI-identified root cause was correct.
recommendationsUseful
boolean
required
Whether the recommended actions were actionable and accurate.
comment
string
Optional free-text feedback. Provide corrections or additional context to improve future analysis.
correctedRootCause
string
If the root cause was inaccurate, provide the correct root cause here. This is used for model fine-tuning.

Response

Returns 201 Created.
{
  "feedbackId": "fbk_01HX9VTPQR3KF8MZWBYD5N6JCE",
  "incidentId": "inc_EXAMPLE_01JX",
  "submittedAt": "2024-04-01T16:00:00Z"
}
FieldTypeDescription
feedbackIdstringUnique identifier for this feedback submission
incidentIdstringThe incident this feedback applies to
submittedAtstringISO 8601 timestamp of feedback submission

Error responses

StatusError codeDescription
401unauthorizedMissing or invalid JWT
403forbiddenCaller lacks required role
404incident_not_foundNo incident with the given ID
409feedback_already_submittedFeedback has already been submitted for this investigation

Examples

curl https://api.causeflow.ai/v1/investigation/inc_EXAMPLE_01JX/feedback \
  -X POST \
  -H "Authorization: Bearer eyJhbGc..." \
  -H "Content-Type: application/json" \
  -d '{
    "rating": 4,
    "rootCauseAccurate": true,
    "recommendationsUseful": true,
    "comment": "Root cause was spot on. Recommendation to add index was correct and resolved the issue."
  }'

Get investigation results

View the full investigation report

Knowledge patterns

Browse extracted knowledge patterns