addAccountToGroup
Add an account to a group by email.
Behavior depends on whether the email already belongs to an organization member:
- If the user is already in the organization, they are added to the group directly
with no invitation step. The mutation returns the resulting
Account. - If the user is not yet in the organization, an invitation email is sent. The
mutation returns a
GroupInvitation. The recipient joins the group when they accept.
Use inline fragments on the union result to handle both branches in a single client call.
Requires the group:manage action on this group.
addAccountToGroup(
organizationId: ID!
groupId: UUID!
input: AddAccountToGroupInput!
): AddedAccountToGroupPayload
Form Schema
This mutation supports dynamic form generation using JSON Schema.
Loading schema...
Arguments
addAccountToGroup.organizationId ● ID! non-null scalar {#organization-id}
Your organization's unique identifier.
addAccountToGroup.groupId ● UUID! non-null scalar {#group-id}
The group to add the account to.
addAccountToGroup.input ● AddAccountToGroupInput! non-null input {#input}
Add an account to a group by email. If the email belongs to an existing organization member they are added directly; otherwise an invitation is sent.