API Reference
This section contains detailed documentation for all available API endpoints.
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/products/{productId}/ai-comments | GET | List comments with filtering and pagination |
/api/products/{productId}/ai-comments/manual-import | POST | Import Reddit posts and create comments |
/api/products/{productId}/ai-comments/{commentId}/approve | POST | Approve a comment for posting |
/api/comment/{commentId} | GET | Get comment details |
Common Response Format
All API responses follow this format:
json
{
"success": true,
"message": "Operation completed",
"data": { ... }
}
Error Response Format
json
{
"error": "Error message",
"success": false
}
HTTP Status Codes
| Status | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Insufficient permissions or credits |
| 404 | Not Found - Resource doesn't exist |
| 500 | Internal Server Error |