Base URL: http://localhost:5000/api
Check if the API is running.
Response:
{
"status": "ok",
"message": "Rate-My-Client API is running"
}Get all clients with their review statistics.
Response:
[
{
"id": 1,
"name": "Client Name",
"company": "Company Name",
"industry": "Tech",
"created_at": "2025-11-21 06:00:00",
"review_count": 5,
"average_rating": 3.5
}
]Get a specific client by ID.
Parameters:
id(path): Client ID
Response:
{
"id": 1,
"name": "Client Name",
"company": "Company Name",
"industry": "Tech",
"created_at": "2025-11-21 06:00:00"
}Search for clients by name or company.
Parameters:
query(path): Search term
Response:
[
{
"id": 1,
"name": "Client Name",
"company": "Company Name",
"industry": "Tech",
"created_at": "2025-11-21 06:00:00",
"review_count": 5,
"average_rating": 3.5
}
]Create a new client.
Request Body:
{
"name": "Client Name",
"company": "Company Name (optional)",
"industry": "Industry Type (optional)"
}Response:
{
"id": 1,
"name": "Client Name",
"company": "Company Name",
"industry": "Industry Type"
}Get detailed statistics for a client.
Parameters:
id(path): Client ID
Response:
{
"total_reviews": 10,
"average_rating": 3.5,
"avg_payment_promptness": 4.2,
"avg_communication_quality": 3.8,
"would_work_again_count": 6,
"scope_creep_count": 3
}Get all reviews with client information.
Response:
[
{
"id": 1,
"client_id": 1,
"rating": 4,
"title": "Great to work with",
"description": "Detailed review text...",
"red_flags": "[\"Late payments\"]",
"would_work_again": true,
"payment_promptness": 4,
"communication_quality": 5,
"scope_creep_issue": false,
"created_at": "2025-11-21 06:00:00",
"client_name": "Client Name",
"client_company": "Company Name"
}
]Get a specific review by ID.
Parameters:
id(path): Review ID
Response:
{
"id": 1,
"client_id": 1,
"rating": 4,
"title": "Great to work with",
"description": "Detailed review text...",
"red_flags": "[\"Late payments\"]",
"would_work_again": true,
"payment_promptness": 4,
"communication_quality": 5,
"scope_creep_issue": false,
"created_at": "2025-11-21 06:00:00",
"client_name": "Client Name",
"client_company": "Company Name"
}Get all reviews for a specific client.
Parameters:
clientId(path): Client ID
Response:
[
{
"id": 1,
"client_id": 1,
"rating": 4,
"title": "Great to work with",
"description": "Detailed review text...",
"red_flags": "[\"Late payments\"]",
"would_work_again": true,
"payment_promptness": 4,
"communication_quality": 5,
"scope_creep_issue": false,
"created_at": "2025-11-21 06:00:00",
"client_name": "Client Name",
"client_company": "Company Name"
}
]Create a new review.
Request Body:
{
"client_id": 1,
"rating": 4,
"title": "Great to work with",
"description": "Detailed review text...",
"red_flags": ["Late payments", "Scope creep"],
"would_work_again": true,
"payment_promptness": 4,
"communication_quality": 5,
"scope_creep_issue": false
}Validation:
client_id(required): Must be a valid client IDrating(required): Integer between 1 and 5title(required): Stringdescription(required): Stringred_flags(optional): Array of stringswould_work_again(optional): Booleanpayment_promptness(optional): Integer between 1 and 5communication_quality(optional): Integer between 1 and 5scope_creep_issue(optional): Boolean
Response:
{
"id": 1,
"client_id": 1,
"rating": 4,
"title": "Great to work with",
"description": "Detailed review text..."
}Update an existing review.
Parameters:
id(path): Review ID
Request Body: Same as POST /reviews (all fields optional except those you want to update)
Response:
{
"message": "Review updated successfully"
}Delete a review.
Parameters:
id(path): Review ID
Response:
{
"message": "Review deleted successfully"
}Analyze a job post for red flags.
Request Body:
{
"jobPostText": "Looking for a passionate developer willing to work for exposure..."
}Response:
{
"score": 43,
"riskLevel": "High",
"flags": [
"Offers \"exposure\" instead of payment",
"Unrealistic availability expectations (24/7)",
"Unlimited revisions mentioned"
],
"details": [
{
"flag": "Offers \"exposure\" instead of payment",
"severity": 10,
"matched": true
}
],
"summary": "Found 3 red flag(s) in this job post.",
"recommendations": [
"⚠️ HIGH RISK: Multiple red flags detected. Carefully evaluate before proceeding.",
"Request clear payment terms in writing before starting.",
"Always use a written contract with clear scope and payment terms."
]
}Risk Levels:
- Low (0-20): Generally safe, minor concerns
- Medium (21-40): Some warning signs, ask clarifying questions
- High (41-60): Multiple red flags, proceed with caution
- Critical (61-100): Severe red flags, high risk
Red Flag Types Detected:
- Exposure/portfolio mentions
- 24/7 availability expectations
- Urgent/ASAP language
- Low budget emphasis
- Free/unpaid work
- Unlimited revisions
- Equity/profit share payment
- Downplays work complexity
- Personal favor language
- Unpaid overtime expectations
- Startup warnings
- Deferred payment
Get history of AI scans (last 50).
Response:
[
{
"id": 1,
"job_post_text": "Original job post text...",
"red_flag_score": 43,
"detected_flags": "[\"flag1\", \"flag2\"]",
"analysis": "{\"score\": 43, ...}",
"created_at": "2025-11-21 06:00:00"
}
]All endpoints may return the following error responses:
{
"error": "Validation error message"
}{
"error": "Resource not found"
}{
"error": "Error message"
}- Create a client:
curl -X POST http://localhost:5000/api/clients \
-H "Content-Type: application/json" \
-d '{"name":"Acme Corp","company":"Acme Inc","industry":"Tech"}'- Submit a review:
curl -X POST http://localhost:5000/api/reviews \
-H "Content-Type: application/json" \
-d '{
"client_id": 1,
"rating": 2,
"title": "Poor experience",
"description": "Client changed requirements constantly...",
"red_flags": ["Scope creep", "Poor communication"],
"would_work_again": false,
"payment_promptness": 1,
"communication_quality": 2,
"scope_creep_issue": true
}'- Search for the client:
curl http://localhost:5000/api/clients/search/Acme- Analyze a suspicious job post:
curl -X POST http://localhost:5000/api/ai/analyze-job-post \
-H "Content-Type: application/json" \
-d '{"jobPostText":"Need developer ASAP! Great exposure opportunity. Must be available 24/7!"}'Currently, there is no rate limiting implemented. For production use, consider implementing rate limiting to prevent abuse.
The API currently accepts requests from all origins. For production, configure CORS to only allow requests from your frontend domain.