{ "openapi": "3.0.3", "info": { "title": "AI Interviewer API", "version": "1.0.0", "description": "Minimal OpenAPI spec for key endpoints to debug via Swagger UI." }, "servers": [ { "url": "http://localhost:8000/api/v1", "description": "Local backend" } ], "paths": { "/auth/login": { "post": { "summary": "Login", "description": "Authenticate user and receive JWT token", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "example": "admin@aiinterviewer.com" }, "password": { "type": "string", "example": "AdminPass123!@" } }, "required": ["email", "password"] } } } }, "responses": { "200": { "description": "Tokens returned", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponse" } } } }, "401": { "description": "Invalid email or password" } } } }, "/auth/refresh": { "post": { "summary": "Refresh token", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "refresh_token": { "type": "string" } }, "required": ["refresh_token"] } } } }, "responses": { "200": { "description": "New access token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccessTokenResponse" } } } } } } }, "/candidates": { "get": { "summary": "List candidates", "parameters": [ { "name": "status", "in": "query", "schema": { "type": "string" } }, { "name": "domain", "in": "query", "schema": { "type": "string" } }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 20 } } ], "responses": { "200": { "description": "Paginated candidates", "content": { "application/json": { "schema": { "type": "object", "properties": { "candidates": { "type": "array", "items": { "$ref": "#/components/schemas/Candidate" } }, "total": { "type": "integer" }, "page": { "type": "integer" }, "page_size": { "type": "integer" } } } } } } } }, "post": { "summary": "Create candidate", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CandidateCreate" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Candidate" } } } } } } }, "/candidates/{candidate_id}": { "get": { "summary": "Get candidate", "parameters": [ { "name": "candidate_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Candidate", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Candidate" } } } } } }, "patch": { "summary": "Update candidate", "parameters": [ { "name": "candidate_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CandidateUpdate" } } } }, "responses": { "200": { "description": "Updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Candidate" } } } } } }, "delete": { "summary": "Delete candidate", "parameters": [ { "name": "candidate_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "204": { "description": "No Content" } } } }, "/candidates/dashboard/stats": { "get": { "summary": "Dashboard stats", "responses": { "200": { "description": "Stats", "content": { "application/json": { "schema": { "type": "object", "properties": { "total_candidates": { "type": "integer" }, "by_status": { "type": "object", "additionalProperties": { "type": "integer" } }, "by_domain": { "type": "object", "additionalProperties": { "type": "integer" } }, "active_interviews": { "type": "integer" }, "pending_feedback": { "type": "integer" } } } } } } } } } }, "components": { "schemas": { "LoginResponse": { "type": "object", "properties": { "access_token": { "type": "string" }, "refresh_token": { "type": "string" }, "token_type": { "type": "string", "example": "bearer" }, "expires_in": { "type": "integer", "example": 3600 } } }, "AccessTokenResponse": { "type": "object", "properties": { "access_token": { "type": "string" }, "token_type": { "type": "string", "example": "bearer" }, "expires_in": { "type": "integer", "example": 3600 } } }, "Candidate": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "email": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "phone": { "type": "string" }, "domain": { "type": "string" }, "position": { "type": "string" }, "experience_years": { "type": "integer" }, "qualifications": { "type": "string" }, "status": { "type": "string" }, "source": { "type": "string" }, "company_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" } } }, "CandidateCreate": { "type": "object", "properties": { "email": { "type": "string" }, "first_name": { "type": "string" }, "last_name": { "type": "string" }, "phone": { "type": "string" }, "domain": { "type": "string" }, "position": { "type": "string" }, "experience_years": { "type": "integer" }, "qualifications": { "type": "string" } }, "required": ["email", "first_name", "last_name"] }, "CandidateUpdate": { "type": "object", "properties": { "first_name": { "type": "string" }, "last_name": { "type": "string" }, "domain": { "type": "string" }, "status": { "type": "string" } } } } } }