Add a team member
add a user to the company’s team. Requires the team:write scope.
Authorizations
OAuth 2.1 authorization code + PKCE (S256). Tokens are tenant-bound (company_id) and scoped. Discover endpoints via /.well-known/oauth-authorization-server.
Body
Add a user to the company's team. companyId is injected from the token tenant and must NOT be supplied. Required (validated in the use-case): userId, email. Source: lib/api/team/add-member.usecase.ts + add_team_member call.body. The route zod (AddMemberInput) is .passthrough(). When role is Admin/Owner the platform forces full permissions.
User id of the member to add.
1Email address of the user to add.
Role to grant (defaults to Employee).
Owner, Admin, Employee Invite id when joining via self-registration (required when userId equals the caller's own id).
Per-member permission flags (9-key boolean set). Each key defaults to true when omitted. Source: lib/team-permissions.ts TEAM_PERMISSION_KEYS + normalizeTeamPermissions (always returns all 9 keys).
Per-member email-notification preferences. Source: lib/team-email-preferences.ts TEAM_EMAIL_PREFERENCE_KEYS + normalizeTeamEmailPreferences (always returns the closed key set).
Response
Add-member success ({ success: true }).
Add-member result. Source: addTeamMember returns { success: true } (lib/api/team/add-member.usecase.ts).