Skip to main content

Program

Programs enroll users, manually or by auto-enrollment rules, and assign them tasks.

📄️ List programs

Lists the current company's programs (the impersonated user's company when impersonating) with their auto-enrollment rules and enrollment counts by status. Requires the `program:list` permission. By default, counts include every enrolled user, and filtering them with `teamIds` also requires `stats:list` for those teams. Set `scopeEnrollmentsToVisibleTeams` to count only users who are not deleted and are on teams you can see with `stats:list`, which this option then requires: company-wide `stats:list` counts every team, or only `teamIds` when given; narrower `stats:list` counts only your visible teams (zero when you have none), and `teamIds` outside them is an error. In a company that uses its own team-visibility rules for reports, those rules decide the visible teams instead of `stats:list`: requested `teamIds` outside them are dropped (zero counts when none remain), a company admin with no visible teams gets company-wide counts, and any other user who is not on a team gets a not-authorized error.

📄️ Get program enrollment progress

Retrieves a user's progress in one program: the enrollment, every task assigned to them in it with a derived status (completed, late, missed, overdue, or open) and the day it is listed under in their time zone, summary counts and completion percentage, and progress toward each of the program's tasks. In a task-completion program, completion is measured against every task the program will assign. In a timeline program, it is measured against every task assigned so far, including open ones, so a user is at 100% only once every assigned task is done. Defaults to the current user; another user requires the `task:list` permission for them. Use `/program/user/get` for the enrollment alone.

📄️ List program enrollments

Lists the users enrolled in the specified program with each enrollment's status, optionally filtered by `status` or `userId`. Without `programId`, lists the programs the given user, or the current user, is enrolled in, which requires the `user:list` permission for that user, including yourself. With `programId` and no `userId`, results are limited to your downline unless you have company-wide `program:manage` permission. With `programId` and a `userId`, returns that user's enrollment if you have `user:list` for them; otherwise results are scoped to your own enrollment instead of returning an error. With `programId`, page with `size` and `sortTimestamp`. `lastUpdateProcess` names the process that last wrote each enrollment, such as an automatic enrollment rule; `modifiedBy` is its audit history of who changed it and when. Without `programId`, each enrollment also has its `summary`, the same progress summary `/program/user/detail` returns.