Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ericcobasdev/careertrack-api/llms.txt

Use this file to discover all available pages before exploring further.

The GET /api/stats endpoint returns a summary of all job applications in the system. It aggregates application counts across each tracked status — applied, interview, offer, and rejected — making it ideal for building dashboard widgets, progress indicators, or at-a-glance pipeline summaries.

Endpoint

GET /api/stats
This endpoint is protected and requires a valid Sanctum Bearer token in the Authorization header.
DetailValue
MethodGET
Path/api/stats
Auth requiredYes — Authorization: Bearer <token>

Request Parameters

This endpoint takes no query parameters and no request body. Simply send a valid Bearer token and the server returns the aggregate stats.

Example Request

curl https://your-domain.com/api/stats \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: application/json"

Response (200 OK)

A successful request returns a JSON object with the following fields:
total
integer
required
Total number of job applications across the entire database.
applied
integer
required
Count of applications with status applied.
interview
integer
required
Count of applications with status interview.
offer
integer
required
Count of applications with status offer.
rejected
integer
required
Count of applications with status rejected.
Example response body:
{
  "total": 24,
  "applied": 10,
  "interview": 8,
  "offer": 2,
  "rejected": 4
}

Error Responses

StatusMeaning
401Unauthorized — the Bearer token is missing, expired, or invalid. Ensure the Authorization header is present and the token was obtained from POST /auth/login.

Dashboard Usage Example

The stats endpoint is well-suited for populating summary tiles or progress bars. The following snippet demonstrates how to fetch and display the pipeline overview in a JavaScript frontend:
const response = await fetch('/api/stats', {
  headers: {
    'Authorization': `Bearer ${token}`,
    'Accept': 'application/json'
  }
});
const stats = await response.json();
console.log(`Total: ${stats.total} | Offers: ${stats.offer}`);
The stats reflect all job applications in the database. This endpoint does not support date-range filtering or any other query parameters — the counts always represent the full lifetime of the application history.
Need to filter applications by status or date range? Use the List Applications endpoint, which supports query parameters for status filtering and returns the full application records.

Build docs developers (and LLMs) love