Skip to main content
Authenticate an employee with their phone number and PIN. On success returns the employee record, current clock status, recent time entries, and a JWT, and sets an auth-token cookie.
Authentication: none (this is how an employee obtains a token).

Request body

string
required
The employee’s phone number — at least 10 characters. The server normalizes the value (strips spaces, dashes, parentheses, dots) and also matches on the last 4 digits, so common formatting variations are tolerated.
string
required
The employee’s PIN — 4 to 6 digits (regex ^\d{4,6}$). Verified against the stored salted PIN hash.

Response

On success returns 200 with the employee (PIN and salt stripped), their clock status, up to 5 recent time entries, and a JWT.
object
The employee record with its company (id, name, payPeriodType, active, bookkeeperOrgId, and the org’s overtime settings + timezone). The pin and pinSalt fields are removed.
object
array
The 5 most recent time entries (newest first), each with id, clockIn, clockOut, totalHours, regularHours, overtimeHours, status.
string
The JWT to send as Authorization: Bearer <token> on employee requests. Also set as the auth-token httpOnly cookie.

Errors

Phone matching is lenient (exact match or last-4-digit suffix match) and only considers active employees. If two active employees share the same last 4 digits, the first match wins — pass a fully-formatted phone number to disambiguate.

Examples