Delete Resume
Permanently deletes a resume and all associated data, including the stored file, analysis records, and linked interview sessions. This operation cannot be undone.Endpoint
Authentication
This endpoint requires authentication. Include your authentication token in the request headers.Path Parameters
The unique identifier of the resume to delete
Response
Status code.
200 indicates successful deletion.Response message
No data returned for this endpoint
Examples
Response Example
Success Response
Error Responses
Error Response Example
What Gets Deleted
When a resume is deleted, the following data is permanently removed:Resume File
Resume File
- The original uploaded file is deleted from RustFS storage
- Storage key and URL become invalid
- File deletion failures are logged but don’t prevent database cleanup
Resume Metadata
Resume Metadata
- Resume entity record (filename, upload date, etc.)
- Parsed resume text content
- Content hash used for duplicate detection
- Access count and statistics
Analysis Records
Analysis Records
- All analysis history records
- Scores (overall, content, structure, etc.)
- Strengths and suggestions
- AI-generated summaries
- Analysis timestamps and status
Interview Sessions
Interview Sessions
- All mock interview sessions created from this resume
- Interview questions and answers
- Interview evaluation results and scores
- Interview session metadata and timestamps
Deletion Process
The deletion follows this sequence:- Validation: Verify resume exists and user has permission
- File Removal: Delete the stored file from RustFS (best effort)
- Interview Cleanup: Delete all associated interview sessions and answers
- Database Cleanup: Remove resume record and all analysis records (cascading)
- Response: Return success confirmation
Cascading Deletion: The database schema is configured with cascading deletes, ensuring all related records (analyses, interviews) are automatically removed when the resume is deleted.
Use Cases
- Privacy Compliance: Allow users to remove personal data
- Cleanup: Remove outdated or incorrect resumes
- Storage Management: Free up storage space
- Testing: Clean up test data in development environments
- Account Closure: Remove all user data when closing account
Best Practices
Confirm Before Deletion
Confirm Before Deletion
Always implement a confirmation dialog to prevent accidental deletions:
Update UI Optimistically
Update UI Optimistically
For better UX, update the UI immediately and handle errors:
Handle Associated Data
Handle Associated Data
Warn users about associated data that will be deleted:
Implement Soft Delete (Alternative)
Implement Soft Delete (Alternative)
For critical applications, consider implementing soft delete on the backend:Benefits:
- Allows data recovery if deleted by mistake
- Maintains referential integrity
- Supports compliance and audit requirements
Security Considerations
Audit Logging: For compliance, log all deletion operations:
Related Endpoints
- List Resumes - Get all resumes to select for deletion
- Get Resume Detail - Check resume details before deletion
- Upload Resume - Upload a new resume after deletion
Troubleshooting
Resume Not Found Error
Resume Not Found Error
Problem: Receive error 2001 even though resume ID is validPossible Causes:
- Resume was already deleted
- User doesn’t have access to this resume
- Database synchronization issue
- Verify resume exists by calling GET /api/resumes/detail first
- Check user authentication and permissions
- Refresh the resume list to get current state
Deletion Takes Too Long
Deletion Takes Too Long
Problem: Delete request times out or takes very longPossible Causes:
- Large number of associated interviews
- Storage service is slow or unavailable
- Database performance issues
- Implement client-side timeout handling
- Show loading indicator to user
- Consider async deletion for resumes with many associations
Partial Deletion
Partial Deletion
Problem: Resume deleted from database but file remains in storageImpact:
- Orphaned files consume storage space
- Not critical as files are inaccessible without database record
- Backend logs warning for investigation
- Implement periodic cleanup job for orphaned files
- Contact support if storage costs become concerning
