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
companystring
✓
Non-empty.
positionstring
✓
Non-empty.
statusenum
—
wishlist · applied · interview · offer · rejected. Default wishlist.
locationstring
—
Nullable.
urlstring
—
Job posting URL.
salarystring
—
Free text, e.g. "$120k".
applied_atdate
—
YYYY-MM-DD or null.
notesstring
—
Nullable.
peoplearray
—
[{ name, role, email, linkedin }] — contacts in charge.
Connection fields
Field
Type
Req
Notes
namestring
✓
Non-empty.
companystring
—
Nullable.
rolestring
—
Job title.
linkedin_urlstring
—
Nullable.
emailstring
—
Nullable.
statusenum
—
to_contact · requested · connected · talking · met. Default to_contact.
last_contacteddate
—
YYYY-MM-DD or null.
notesstring
—
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.