Authentication & cookies
Webmail and settings endpoints authenticate via the HttpOnly zinq_session JWT cookie issued by POST /api/auth/login. Every request is scoped strictly to the authenticated user_id and org_id.
Sign in
curl -c cookies.txt -X POST https://zinqmail.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"alex@yourcompany.com","password":"your-password"}'Healthcheck & error format
GET
Public/api/healthVerifies SQLite connectivity and returns server health status.
{ "status": "ok", "db": "connected" }Validation errors
All write endpoints validate input with Zod and return HTTP 400 with { error, fieldErrors } when fields fail validation.