Skip to main content
The Sessions API allows you to create and manage interview sessions. Each session represents a single interview preparation instance tied to a specific job title and company.

Endpoints

Create Session

POST /session/create
endpoint
Create a new interview session with job details.

Request Parameters

job_title
string
required
The job title for which the interview is being prepared. Maximum 200 characters.
company_name
string
required
The company name where the job is located.

Response

Redirects to the upload page for the newly created session.

Example Request

curl -X POST https://your-domain.com/session/create \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "job_title=Senior Software Engineer" \
  -d "company_name=TechCorp Inc"

Success Response

{
  "redirect": "/session/123/upload",
  "session_id": 123
}

Error Responses

ValidationError
object
Returned when required fields are missing or invalid.
error
string
Error message describing the validation failure.
Example Errors:
  • “Job title cannot be empty”
  • “Company name cannot be empty”
  • “Job title too long (max 200 characters)“

Get Dashboard

GET /dashboard
endpoint
Retrieve the user’s dashboard with recent interview sessions.

Response

Returns an HTML page displaying up to 5 most recent sessions.
recent_sessions
array
List of recent session objects.
id
integer
Unique session identifier.
job_title
string
The job title for this session.
company_name
string
The company name for this session.
created_at
datetime
Timestamp when the session was created.
cv_text
string | null
Extracted CV text if uploaded.
job_description_text
string | null
Job description if provided.

Example Request

curl -X GET https://your-domain.com/dashboard \
  -H "Cookie: session=your_session_cookie"

Example Response Data

{
  "recent_sessions": [
    {
      "id": 123,
      "job_title": "Senior Software Engineer",
      "company_name": "TechCorp Inc",
      "created_at": "2026-03-03T10:30:00Z",
      "cv_text": "John Doe\n5 years of experience...",
      "job_description_text": "We are looking for..."
    },
    {
      "id": 122,
      "job_title": "Frontend Developer",
      "company_name": "StartupXYZ",
      "created_at": "2026-03-02T14:20:00Z",
      "cv_text": null,
      "job_description_text": null
    }
  ]
}

Get Landing Page

GET /
endpoint
Retrieve the application landing page.

Response

Returns the landing HTML page for the application.

Example Request

curl -X GET https://your-domain.com/

Session Object Structure

The Session object represents an interview preparation session:
id
integer
Unique identifier for the session.
user_id
integer | null
Associated user ID (optional, for future authentication).
job_title
string
Job title (max 200 characters).
company_name
string
Company name (max 200 characters).
cv_text
string | null
Extracted text from uploaded CV.
job_description_text
string | null
Job description text.
created_at
datetime
Session creation timestamp.

Error Handling

All endpoints follow standard HTTP status codes:
  • 200 OK: Successful request
  • 302 Found: Successful redirect after POST
  • 400 Bad Request: Validation error
  • 403 Forbidden: Unauthorized access to session
  • 404 Not Found: Session not found
  • 500 Internal Server Error: Unexpected server error

Common Error Response Format

{
  "error": "Error message describing the issue",
  "type": "ValidationError"
}

Build docs developers (and LLMs) love