# Enqueue (202)
curl -X POST "https://<host>/api/investigations" \
-H "Authorization: Bearer $CLERK_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"raw_alert": {"alert_name": "HighCPU"}, "severity": "critical",
"workspace_id": "T0123456"}'
# → {"investigation_id": "3f6…", "status": "queued"}
# workspace_id is optional — pass the Slack workspace (team) id when the
# investigation originates from a Slack workspace.
# Poll
curl "https://<host>/api/investigations/<investigation_id>" \
-H "Authorization: Bearer $CLERK_SESSION_TOKEN"
# → {"investigation_id": "3f6…", "status": "queued|running|completed|failed",
# "report_s3_key": null, "report_url": null, "error": null}