Skip to Content
Docs are evolving — expect frequent updates.
CompanyAdd Comment

Add Comment

Add a comment to a project for team collaboration, status updates, due diligence notes, or tracking decisions. Comments are timestamped and attributed to your API key’s account.

Endpoint

POST https://api.kruncher.ai/api/integration/project/comment

Headers

HeaderRequiredDescription
AuthorizationYesYour API key (format: YOUR_API_KEY)
Content-TypeYesapplication/json

Request Body

FieldTypeRequiredDescription
projectIdstringYesThe unique identifier for the project (UUID format)
commentstringYesThe comment text to add (max 5000 characters)

Use Cases

  • Due Diligence Notes: Track analysis findings and decisions
  • Status Updates: Log project progress and milestone achievements
  • Team Collaboration: Share findings and feedback with team members
  • Decision Tracking: Document important decisions made about the project
  • Issue Tracking: Record bugs, concerns, or follow-up items
  • Audit Trail: Maintain compliance and audit documentation

Quick Start

cURL

CODE
curl -X POST "https://api.kruncher.ai/api/integration/project/comment" \
  -H "Authorization: YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": "521a93a6-091d-4943-ba13-7c1a654a14ae",
    "comment": "Completed due diligence review. Positive market traction and strong team."
  }'

Response:

CODE
{
  "success": true,
  "data": {
    "id": "comment_abc123",
    "projectId": "521a93a6-091d-4943-ba13-7c1a654a14ae",
    "comment": "Completed due diligence review. Positive market traction and strong team.",
    "createdAt": "2024-01-15T10:30:00Z",
    "createdBy": "api_user_xyz"
  }
}

Code Examples

JavaScript/TypeScript

CODE
const API_KEY = "YOUR_API_KEY_HERE";
const BASE_URL = "https://api.kruncher.ai/api";
 
async function addComment(projectId, comment) {
  const response = await fetch(`${BASE_URL}/integration/project/comment`, {
    method: "POST",
    headers: {
      "Authorization": `${API_KEY}`,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      projectId,
      comment
    })
  });
 
  if (!response.ok) {
    throw new Error(`Failed to add comment: ${response.statusText}`);
  }
 
  return await response.json();
}
 
// Usage
const result = await addComment(
  "521a93a6-091d-4943-ba13-7c1a654a14ae",
  "Completed due diligence review. Strong market fit."
);
 
console.log("Comment added:", result.data.id);

Result: Adds comment to project and returns comment ID.

Python

CODE
import requests
 
API_KEY = "YOUR_API_KEY_HERE"
BASE_URL = "https://api.kruncher.ai/api"
 
def add_comment(project_id: str, comment: str) -> dict:
    """Add a comment to a project."""
    url = f"{BASE_URL}/integration/project/comment"
    
    headers = {
        "Authorization": f"{API_KEY}",
        "Content-Type": "application/json"
    }
    
    payload = {
        "projectId": project_id,
        "comment": comment
    }
    
    response = requests.post(url, json=payload, headers=headers)
    response.raise_for_status()
    
    return response.json()
 
# Usage
result = add_comment(
    "521a93a6-091d-4943-ba13-7c1a654a14ae",
    "Completed due diligence review. Strong market fit."
)
 
print(f"Comment added: {result['data']['id']}")
print(f"Created at: {result['data']['createdAt']}")

Result: Simple comment addition.

Response Structure

Success Response (200 OK)

CODE
{
  "success": true,
  "data": {
    "id": "comment_abc123",
    "projectId": "521a93a6-091d-4943-ba13-7c1a654a14ae",
    "comment": "Completed due diligence review. Positive market traction and strong team.",
    "createdAt": "2024-01-15T10:30:00Z",
    "createdBy": "api_user_xyz"
  }
}

Response Fields

FieldTypeDescription
idstringUnique comment identifier
projectIdstringThe project UUID
commentstringThe comment text
createdAtstringISO 8601 timestamp when created
createdBystringAccount/API key that created the comment

Error Responses

400 Bad Request - Missing/Invalid Fields

CODE
{
  "success": false,
  "error": "projectId and comment are required"
}

404 Not Found - Project Doesn’t Exist

CODE
{
  "success": false,
  "error": "Project not found"
}

401 Unauthorized - Invalid API Key

CODE
{
  "success": false,
  "error": "Unauthorized"
}

Common Patterns

Pattern 1: Log Due Diligence Findings

CODE
async function logDueDiligenceFindings(projectId, findings) {
  const comment = `
Due Diligence Findings:
- Market: ${findings.market}
- Team: ${findings.team}
- Product: ${findings.product}
- Financials: ${findings.financials}
- Status: ${findings.status}
  `.trim();
 
  const result = await addComment(projectId, comment);
  return result.data.id;
}
 
// Usage
const commentId = await logDueDiligenceFindings(
  "521a93a6-091d-4943-ba13-7c1a654a14ae",
  {
    market: "Large TAM, growing 25% YoY",
    team: "Experienced founders with relevant background",
    product: "MVP launched, early traction",
    financials: "Unit economics look positive",
    status: "Moving to next round"
  }
);
 
console.log(`Logged findings in comment: ${commentId}`);

Pattern 2: Status Update Trail

CODE
from datetime import datetime
 
def log_status_update(project_id: str, status: str, notes: str):
    """Log a status update with timestamp."""
    timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    
    comment = f"[{timestamp}] Status Update: {status}\n{notes}"
    
    result = add_comment(project_id, comment)
    return result['data']['id']
 
# Usage
comment_id = log_status_update(
    "521a93a6-091d-4943-ba13-7c1a654a14ae",
    "Moved to Screening",
    "Team confirmed working on next generation product. Strong market validation."
)

Pattern 3: Track Decision Points

CODE
async function logDecision(projectId, decision, reasoning, nextSteps) {
  const comment = `
DECISION: ${decision}
 
Reasoning:
${reasoning}
 
Next Steps:
${nextSteps}
  `.trim();
 
  const result = await addComment(projectId, comment);
  return result.data;
}
 
// Usage
const commentData = await logDecision(
  "521a93a6-091d-4943-ba13-7c1a654a14ae",
  "PASSED SCREENING",
  "Met all screening criteria. Market fit confirmed. Team qualified.",
  "Schedule follow-up meeting. Request detailed financials."
);

Best Practices

Comment Content

  • Use clear, concise language
  • Include timestamps for important milestones
  • Link to external documents or references when needed
  • Use structured format for complex information
  • Keep comments under 1000 characters for readability

Organization

  • One comment per topic/decision
  • Use consistent formatting for similar updates
  • Include context for future readers
  • Reference related projects or decisions

Collaboration

  • Comment with relevant details for team members
  • Include action items and next steps
  • Mention follow-up dates and owners
  • Tag important findings for visibility

Audit Trail

  • Log all key decisions
  • Document reasoning for decisions
  • Timestamp important milestones
  • Maintain compliance documentation

Error Handling

Handling 404 - Project Not Found

CODE
try {
  await addComment("invalid-project-id", "Test comment");
} catch (error) {
  if (error.message.includes("not found")) {
    console.error("Project does not exist. Check projectId.");
    // Fallback: search for project first
    const project = await findProject(projectName);
    if (project) {
      await addComment(project.id, "Test comment");
    }
  }
}

Handling Comment Too Long

CODE
def add_comment_with_truncation(project_id: str, comment: str, max_length: int = 5000):
    """Add comment, automatically truncate if too long."""
    if len(comment) > max_length:
        truncated = comment[:max_length - 3] + "..."
        print(f"Warning: Comment truncated from {len(comment)} to {len(truncated)} chars")
        comment = truncated
    
    return add_comment(project_id, comment)

Validate Before Adding

CODE
async function addCommentSafely(projectId, comment) {
  // Validate project exists first
  const projectExists = await checkProjectExists(projectId);
  
  if (!projectExists) {
    throw new Error(`Project ${projectId} does not exist`);
  }
  
  // Validate comment
  if (!comment || comment.trim().length === 0) {
    throw new Error("Comment cannot be empty");
  }
  
  if (comment.length > 5000) {
    throw new Error("Comment exceeds 5000 character limit");
  }
  
  // Add comment
  return await addComment(projectId, comment);
}

Troubleshooting

Comment Not Appearing

  • Verify projectId is correct and project exists
  • Check API key has necessary permissions
  • Confirm comment text is valid and not empty

404 Error on Valid Project

  • Project may have been deleted
  • ProjectId may be from different environment
  • Verify UUID format is correct

Batch Operations Failing

  • Check rate limits (may need delays between requests)
  • Validate all projectIds before batch operation
  • Log failed projectIds for manual review

Need Help?

  • Invalid projectId? Use Get Project Details to find correct ID
  • Batch commenting? Use the ProjectCommentManager class for batch operations
  • Need audit trail? Comments are timestamped and attributed automatically
Last updated on