The TalentPilot API provides endpoints for managing conversations, candidates, jobs, and feedback. The API is organized around REST principles and returns JSON responses.
http://localhost:3000/api
Currently, there is no authentication required for API endpoints. All endpoints are publicly accessible.
All error responses follow this format:
{
"error": "Error message"
}GET /conversations
Retrieve all conversations, ordered by most recently updated.
{
"success": true,
"data": [
{
"id": 1,
"title": "Senior React Developer",
"user_id": null,
"created_at": "2023-05-01T10:00:00.000Z",
"updated_at": "2023-05-01T10:05:00.000Z"
}
]
}POST /conversations
Create a new conversation.
{
"title": "New Conversation"
}{
"success": true,
"data": {
"id": 1,
"title": "New Conversation"
}
}GET /conversations/{id}
Retrieve a specific conversation and its messages.
{
"success": true,
"data": {
"id": 1,
"title": "Senior React Developer",
"user_id": null,
"created_at": "2023-05-01T10:00:00.000Z",
"updated_at": "2023-05-01T10:05:00.000Z",
"messages": [
{
"id": 1,
"conversation_id": 1,
"role": "user",
"content": "I need a senior React developer",
"created_at": "2023-05-01T10:00:00.000Z"
},
{
"id": 2,
"conversation_id": 1,
"role": "assistant",
"content": "# Job Analysis Results...",
"created_at": "2023-05-01T10:05:00.000Z"
}
]
}
}PUT /conversations/{id}/title
Update the title of a conversation.
{
"title": "Updated Title"
}{
"success": true,
"message": "Conversation title updated successfully"
}POST /conversations/message
Send a message in a conversation and get AI-generated candidate matches.
{
"message": "I need a senior React developer with 5+ years experience",
"conversationId": 1
}If conversationId is not provided, a new conversation will be created.
{
"success": true,
"data": {
"conversation": {
"id": 1,
"title": "Senior React Developer",
"user_id": null,
"created_at": "2023-05-01T10:00:00.000Z",
"updated_at": "2023-05-01T10:05:00.000Z",
"messages": [
// Array of messages in the conversation
]
},
"agentResult": {
// Detailed agent processing results
},
"candidatesDelivered": true
}
}POST /conversations/{id}/feedback
Provide feedback on the candidates or job description in a conversation.
{
"feedback": "I'm looking for candidates with more experience in Node.js"
}{
"success": true,
"data": {
"conversation": {
// Updated conversation with feedback message
},
"feedback": "Based on your feedback, I've refined the search..."
}
}DELETE /conversations/{id}
Delete a conversation and all its messages.
{
"success": true,
"message": "Conversation deleted successfully"
}POST /candidates/upload
Upload and process a candidate's CV.
Multipart form data with:
cv- The CV file (PDF or DOCX)name- Candidate's nameemail- Candidate's emailphone- Candidate's phone numberlinkedinUrl- Candidate's LinkedIn profile URL
{
"success": true,
"data": {
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"linkedinUrl": "https://linkedin.com/in/johndoe"
}
}GET /candidates
Retrieve all candidates.
{
"success": true,
"data": [
{
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"linkedin_url": "https://linkedin.com/in/johndoe",
"created_at": "2023-05-01T10:00:00.000Z"
}
]
}GET /candidates/{id}
Retrieve a specific candidate's details.
{
"success": true,
"data": {
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"linkedin_url": "https://linkedin.com/in/johndoe",
"cv_text": "Candidate's CV content...",
"cv_vector": [0.1, 0.2, 0.3, ...], // Vector representation
"created_at": "2023-05-01T10:00:00.000Z",
"updated_at": "2023-05-01T10:00:00.000Z"
}
}PUT /candidates/{id}
Update a candidate's information.
Multipart form data with any of:
cv- Updated CV filename- Updated nameemail- Updated emailphone- Updated phone numberlinkedinUrl- Updated LinkedIn URL
{
"success": true,
"message": "Candidate updated successfully"
}GET /candidates/{id}/similar
Find candidates similar to a given candidate using vector similarity.
{
"success": true,
"data": [
{
"id": 2,
"name": "Jane Smith",
"email": "jane@example.com",
"phone": "+1987654321",
"linkedinUrl": "https://linkedin.com/in/janesmith",
"similarity": 0.85
}
]
}POST /chat
Send a job description and get candidate matches.
{
"message": "I need a senior React developer with 5+ years experience"
}{
"success": true,
"data": {
"jobRequirements": {
"jobTitle": "Senior React Developer",
"experienceLevel": "Senior",
"requiredSkills": ["React", "JavaScript", "HTML", "CSS"],
"education": "Bachelor's degree in Computer Science or related field"
},
"candidates": [
{
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"linkedinUrl": "https://linkedin.com/in/johndoe",
"similarity": 0.92,
"profileSummary": "Experienced React developer with 7 years of experience...",
"matchAnalysis": {
"matchScore": 92,
"strengths": ["React expertise", "Frontend development"],
"keySkillsMatch": ["React", "JavaScript"],
"areasForDevelopment": ["Backend experience"],
"experienceRelevance": "7 years of React experience",
"culturalFit": "Strong team player",
"summary": "Excellent match for the position"
},
"communicationTemplates": {
"email": {
"subject": "Opportunity for Senior React Developer - John Doe",
"body": "Dear John,\n\nWe have an exciting opportunity..."
},
"linkedin": {
"message": "Hi John, I have an opportunity that might interest you..."
},
"phone": {
"opening": "Hi John",
"introduction": "I'm calling about a Senior React Developer position...",
"valueProposition": "This role offers the opportunity to work with cutting-edge technologies...",
"questions": ["What are you looking for in your next role?", "What's your experience with React?"],
"nextSteps": "Would you be interested in learning more about this opportunity?"
}
}
}
],
"overallSummary": "Job Analysis Complete:\n\nPosition: Senior React Developer\nCandidates Found: 5\n\nTop candidates have been identified..."
}
}