Skip to main content
POST
/
v1
/
investigation
/
{incidentId}
/
context
Add context
curl --request POST \
  --url https://api.example.com/v1/investigation/{incidentId}/context \
  --header 'Content-Type: application/json' \
  --data '
{
  "context": "<string>",
  "reinvestigate": true,
  "suggestedAgents": [
    "<string>"
  ]
}
'

Overview

Adds supplemental information to an ongoing or completed investigation. Use this endpoint when new evidence becomes available — for example, a stack trace, a relevant log excerpt, or a recently discovered configuration change. Set reinvestigate: true to trigger a new investigation pass that incorporates the added context alongside all previous evidence. Required role: admin, owner, or operator

Path parameters

incidentId
string
required
The unique identifier of the incident. Example: inc_01HX9VTPQR3KF8MZWBYD5N6JCE.

Request body

context
string
required
The additional information to add to the investigation. Include relevant logs, stack traces, configuration changes, or any other details that may help identify the root cause.
reinvestigate
boolean
When true, triggers a new investigation pass using all available context. Defaults to false. Consumes 1 investigation from your monthly quota when set to true.
suggestedAgents
string[]
Optional list of specialist agent IDs to include in the re-investigation. When omitted, CauseFlow uses the same agents as the original investigation or selects agents automatically.

Response

Returns 200 OK confirming the context was added.
{
  "incidentId": "inc_01HX9VTPQR3KF8MZWBYD5N6JCE",
  "message": "Context added successfully. A new investigation has been triggered.",
  "reinvestigating": true
}
FieldTypeDescription
incidentIdstringThe incident the context was added to
messagestringConfirmation message
reinvestigatingbooleantrue if a new investigation pass was triggered, false otherwise

Examples

curl https://api.causeflow.ai/v1/investigation/inc_01HX9VTPQR3KF8MZWBYD5N6JCE/context \
  -X POST \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "context": "Found relevant log entry: [2024-04-01 14:32:01] ERROR slow_query duration=4823ms query=SELECT * FROM orders WHERE tenant_id=? — this query runs without an index on the tenant_id column in the orders table.",
    "reinvestigate": true,
    "suggestedAgents": ["database-specialist"]
  }'