Invite someone to a workspace
invite_workspace_member
Invites one or more people to a workspace by email, each with a join link.
Each person gets an email with a join link that expires after 7 days, so this reaches real people. The tool tells the client to confirm the addresses with you first and never to invite anyone you did not name. Check each address with check_member_email first to avoid a duplicate invitation.
It needs the Manage members permission (members.manage), and the workspace must be on Pro or Enterprise, otherwise it is refused with This workspace must be on the Pro plan to invite members! Assigning a role at the same time also needs the Manage roles permission (roles.manage). Without it the roles are ignored silently and everyone is invited on the stock Member role.
The whole call is refused if any address already belongs to a member (Some users are already members!) or already has a pending invitation (Some users already have pending invitations!), if you invite yourself, or if the invitations would take the workspace past 50 people besides its owner, pending invitations included. An address that belongs to a Modulify site cannot be invited either. See Members and roles.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
workspaceId |
string | Yes | The workspace to invite them to. |
emails |
array of strings | Yes | The email addresses to invite. |
roles |
object | No | Role ids keyed by the lowercased email address, for example { "[email protected]": "<roleId>" }. An address with no entry, or with an id that is not one of the workspace's custom roles, is invited on the stock Member role. Needs the Manage roles permission and is ignored without it. |