<!-- https://headless-lms.dev/docs/api/people -->

# People

The organization's people, invites and the roles they hold

- [The organization's team](https://headless-lms.dev/docs/api/people/listTeam): Requires `people:read`. Everyone with an org role other than Member or a role on a content item, invited people included.
- [A person's roles](https://headless-lms.dev/docs/api/people/listPersonRoles): Requires `people:read`. Their org role and every role they hold on a content item.
- [Set a person's org role](https://headless-lms.dev/docs/api/people/setOrgRole): Requires `people:write`. Needs every permission the old and the new role hold. Nobody changes their own roles, and the owner's role changes only by transfer.
- [Remove a person's role on a content item](https://headless-lms.dev/docs/api/people/unassignRole): Requires `people:write`.
- [Give a person a role on a content item](https://headless-lms.dev/docs/api/people/assignRole): Requires `people:write`. The role must list the item's type as a level. Needs every permission the old and the new role give there.
- [The people with a role on a content item](https://headless-lms.dev/docs/api/people/listRolesOn): Requires `people:read`.
- [Remove a person from the organization](https://headless-lms.dev/docs/api/people/removePerson): Requires `people:delete`. Needs every permission the person holds, where they hold it. Revokes their API keys and connected apps here. The owner can't be removed (409); neither can someone whose posts must be kept (409).
- [Invite a person with an org role](https://headless-lms.dev/docs/api/people/createInvite): Requires `people:write`. The person is created by this call and returned as `orgUserId`, so access and item roles can be given before they accept. Needs every permission the role holds; never `owner` (409). `host` is the app the invite link opens and must be one of the organization's hosts (409).
- [Resend a person's pending invite](https://headless-lms.dev/docs/api/people/resendInvite): Requires `people:write`. Issues a new link; the resender becomes the inviter. `host` is the app the invite link opens and must be one of the organization's hosts (409).
- [Cancel a person's pending invite](https://headless-lms.dev/docs/api/people/cancelInvite): Requires `people:write`. Someone still invited who holds no access and no item role is removed with it.
- [Read an invite by its token](https://headless-lms.dev/docs/api/people/getInvite): Public: no session needed. The same 404 answers forged, expired and accepted tokens, so a probe learns nothing.
- [Accept an invite with the signed-in account](https://headless-lms.dev/docs/api/people/acceptInvite): For any signed-in person whose email matches the invitation. Makes the invite's organization the session's active one. 400 when the token is invalid or expired, the email does not match, or the inviter no longer holds the role.
- [List students](https://headless-lms.dev/docs/api/people/listStudents): Requires `people:read`. People whose org role is Member, invited ones included, with the roles they hold on content items.
- [A person's learner record](https://headless-lms.dev/docs/api/people/getStudent): Requires `people:read`. Opens for any person in the organization, whatever their roles.
