Lead Management API
Sales leads REST API
A FastAPI service for creating leads and moving them through a sales status lifecycle.
A REST API for managing sales leads, built as a backend internship assessment. It covers creating, listing, updating and deleting leads, with validation and auto-generated docs.
What it does
- Status lifecycle from new to contacted to qualified, ending in converted or lost.
- Pydantic validation with clear status codes: 201 on create, 400 for duplicate leads, 404 for missing ones, 422 for invalid input.
- Layered code: separate modules for database setup, models, schemas and CRUD logic.
- SQLite persistence through SQLAlchemy.
- Faker seed script inserts 20 realistic sample leads.
- Swagger and ReDoc docs generated automatically; Pytest suite covers the endpoints.




