
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@brandcast_app/zoomshift-api-client
Advanced tools
Unofficial TypeScript/JavaScript client for ZoomShift employee scheduling API (reverse-engineered)
Unofficial TypeScript/JavaScript client for the ZoomShift employee scheduling API.
This is an UNOFFICIAL client library. ZoomShift does not provide a public API, and this library is based on reverse engineering their internal endpoints.
Use at your own risk:
npm install @brandcast_app/zoomshift-api-client
or
yarn add @brandcast_app/zoomshift-api-client
import { ZoomShiftClient } from '@brandcast_app/zoomshift-api-client';
// Create a client instance
const client = new ZoomShiftClient({
debug: true, // Optional: enable debug logging
timeout: 30000, // Optional: request timeout in ms (default: 30000)
});
// Authenticate with ZoomShift
const auth = await client.authenticate(
'your@email.com',
'your-password',
'58369' // Your schedule ID (found in ZoomShift URL)
);
console.log('Authenticated:', auth.authenticated);
// Get shifts for a date range
const shifts = await client.getShifts({
startDate: '2025-10-10',
endDate: '2025-10-17',
});
console.log(`Found ${shifts.length} shifts:`);
for (const shift of shifts) {
console.log(`${shift.employeeName} - ${shift.role}`);
console.log(` ${shift.startTime} to ${shift.endTime}`);
console.log(` Duration: ${shift.duration} hours`);
}
new ZoomShiftClient(options?)Create a new ZoomShift API client.
Parameters:
options (optional) - Configuration options
debug?: boolean - Enable debug logging (default: false)timeout?: number - Request timeout in milliseconds (default: 30000)userAgent?: string - Custom user agent stringconst client = new ZoomShiftClient({
debug: true,
timeout: 30000,
});
authenticate(email, password, scheduleId): Promise<ZoomShiftAuthResponse>Authenticate with ZoomShift using email, password, and schedule ID.
Parameters:
email: string - Your ZoomShift account emailpassword: string - Your ZoomShift account passwordscheduleId: string - Your schedule ID (found in ZoomShift URL)Returns: Promise<ZoomShiftAuthResponse>
{
authenticated: boolean;
scheduleId: string;
userName: string;
}
Example:
const auth = await client.authenticate(
'manager@example.com',
'mypassword',
'58369'
);
Finding Your Schedule ID: Your schedule ID is in the ZoomShift URL:
https://app.zoomshift.com/58369/dashboard
^^^^^ This is your schedule ID
getShifts(request): Promise<ZoomShiftShift[]>Get employee shifts for a date range with optional filters.
Parameters:
request: GetShiftsRequest
startDate: string - Start date (YYYY-MM-DD format)endDate: string - End date (YYYY-MM-DD format)employeeId?: string - (Optional) Filter by employee IDlocation?: string - (Optional) Filter by locationReturns: Promise<ZoomShiftShift[]>
Example:
// Get all shifts for next week
const shifts = await client.getShifts({
startDate: '2025-10-10',
endDate: '2025-10-17',
});
// Get shifts for specific employee
const employeeShifts = await client.getShifts({
startDate: '2025-10-10',
endDate: '2025-10-17',
employeeId: '12345',
});
// Get shifts for specific location
const storeShifts = await client.getShifts({
startDate: '2025-10-10',
endDate: '2025-10-17',
location: 'Main Store',
});
isAuthenticated(): booleanCheck if the client is currently authenticated.
if (client.isAuthenticated()) {
console.log('Client is ready to make API calls');
}
getScheduleId(): string | nullGet the current schedule ID.
const scheduleId = client.getScheduleId();
console.log('Using schedule:', scheduleId);
interface ZoomShiftShift {
id: string;
employeeName: string;
employeeId: string;
role: string;
startTime: string; // ISO 8601 format
endTime: string; // ISO 8601 format
duration: number; // hours
breakDuration?: number; // hours
location?: string;
notes?: string;
status: 'scheduled' | 'in_progress' | 'completed' | 'cancelled';
}
interface ZoomShiftAuthResponse {
authenticated: boolean;
scheduleId: string;
userName: string;
}
interface GetShiftsRequest {
startDate: string; // YYYY-MM-DD
endDate: string; // YYYY-MM-DD
employeeId?: string;
location?: string;
}
interface ZoomShiftError {
code: string;
message: string;
details?: unknown;
}
The client throws ZoomShiftError objects with descriptive error codes:
try {
await client.authenticate('user@example.com', 'wrong-password', '58369');
} catch (error) {
const zsError = error as ZoomShiftError;
console.error('Error code:', zsError.code);
console.error('Error message:', zsError.message);
// Handle specific errors
switch (zsError.code) {
case 'AUTH_FAILED':
console.error('Invalid credentials');
break;
case 'SESSION_EXPIRED':
console.error('Please re-authenticate');
break;
default:
console.error('Unknown error');
}
}
Common Error Codes:
CSRF_TOKEN_MISSING - Failed to extract CSRF tokenAUTH_FAILED - Invalid credentialsNOT_AUTHENTICATED - Must call authenticate() firstSESSION_EXPIRED - Session expired, need to re-authenticateFETCH_FAILED - Failed to fetch shiftsAUTH_REQUEST_FAILED - Network error during authenticationAUTH_UNKNOWN_ERROR - Unknown authentication errorimport { ZoomShiftClient } from '@brandcast_app/zoomshift-api-client';
async function main() {
// Create client with debug logging
const client = new ZoomShiftClient({ debug: true });
try {
// Authenticate
console.log('Authenticating...');
const auth = await client.authenticate(
'manager@example.com',
'mypassword',
'58369'
);
console.log('✓ Authenticated successfully');
// Get shifts for next 7 days
const today = new Date();
const nextWeek = new Date(today);
nextWeek.setDate(nextWeek.getDate() + 7);
const formatDate = (date: Date) => date.toISOString().split('T')[0];
console.log('Fetching shifts...');
const shifts = await client.getShifts({
startDate: formatDate(today),
endDate: formatDate(nextWeek),
});
console.log(`✓ Found ${shifts.length} shifts`);
// Display shifts grouped by day
const shiftsByDay = new Map<string, typeof shifts>();
for (const shift of shifts) {
const day = shift.startTime.split('T')[0];
if (!shiftsByDay.has(day)) {
shiftsByDay.set(day, []);
}
shiftsByDay.get(day)!.push(shift);
}
for (const [day, dayShifts] of shiftsByDay) {
console.log(`\n${day}:`);
for (const shift of dayShifts) {
const start = new Date(shift.startTime).toLocaleTimeString();
const end = new Date(shift.endTime).toLocaleTimeString();
console.log(` ${shift.employeeName} (${shift.role})`);
console.log(` ${start} - ${end} (${shift.duration}h)`);
}
}
} catch (error) {
console.error('Error:', error);
}
}
main();
npm install
npm run build
npm test
npm run dev
Inspired by reverse engineering work similar to the py-cozi Python library.
This is an unofficial library and is not affiliated with, endorsed by, or connected to ZoomShift. Use at your own risk. The developers of this library are not responsible for any issues that may arise from its use.
MIT License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
Status: 🚧 Pre-alpha - API under active development
FAQs
Unofficial TypeScript/JavaScript client for ZoomShift employee scheduling API (reverse-engineered)
We found that @brandcast_app/zoomshift-api-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.