Job TrackerAPI

API reference

Full CRUD for jobs and connections, served by this app under /api/*. Same origin as the UI — no auth, no CORS.

Base URL
/api
Content type
application/json
Auth
none (service-side key)

Endpoints

Health

GET/api/healthLiveness probe. Does not touch the database.

Jobs

GET/api/jobs ?status= &search=List jobs, newest first.
GET/api/jobs/:idFetch one job.
POST/api/jobsCreate a job (201).
PATCH/api/jobs/:idPartial update.
DELETE/api/jobs/:idDelete a job (204).
POST/api/jobs/refreshMove jobs older than 6 weeks to “rejected”.
DELETE/api/jobs/clear-rejectedDelete all rejected jobs.

Connections

GET/api/connections ?status= &search=List connections, newest first.
GET/api/connections/:idFetch one connection.
POST/api/connectionsCreate a connection (201).
PATCH/api/connections/:idPartial update.
DELETE/api/connections/:idDelete a connection (204).

Job fields

Field
Type
Req
Notes
company
string
Non-empty.
position
string
Non-empty.
status
enum
wishlist · applied · interview · offer · rejected. Default wishlist.
location
string
Nullable.
url
string
Job posting URL.
salary
string
Free text, e.g. "$120k".
applied_at
date
YYYY-MM-DD or null.
notes
string
Nullable.
people
array
[{ name, role, email, linkedin }] — contacts in charge.

Connection fields

Field
Type
Req
Notes
name
string
Non-empty.
company
string
Nullable.
role
string
Job title.
linkedin_url
string
Nullable.
email
string
Nullable.
status
enum
to_contact · requested · connected · talking · met. Default to_contact.
last_contacted
date
YYYY-MM-DD or null.
notes
string
Nullable.

Examples

Create a job with contacts:

curl -X POST /api/jobs \
  -H "Content-Type: application/json" \
  -d '{
    "company": "Acme Inc.",
    "position": "Frontend Engineer",
    "status": "applied",
    "applied_at": "2026-07-01",
    "people": [
      { "name": "Jane Doe", "role": "Recruiter", "email": "jane@acme.com" }
    ]
  }'

Move stale jobs (6+ weeks) to rejected:

curl -X POST /api/jobs/refresh
# → { "updated": 3 }

Errors

Status
When
Body
400
Validation failed / bad filter / no valid fields
{ "errors": ["company is required."] }
404
Resource id not found / unknown route
{ "error": "Not found" }
500
Unexpected server or database error
{ "error": "Internal server error" }

Unknown fields in a request body are ignored, not rejected.