AddedAccountToGroup
The result of addAccountToGroup.
- When the email already belongs to an organization member, the API adds them to the group
directly and returns an
Account. - When the email is new to the organization, the API sends an invitation and returns a
GroupInvitation. The recipient becomes a member when they accept.
Use inline fragments to react to each branch:
mutation {
addAccountToGroup(
organizationId: "my-org"
groupId: "platform"
input: { email: "newuser@example.com" }
) {
successful
result {
... on Account { id email }
... on GroupInvitation { email createdAt }
}
}
}
union AddedAccountToGroup = Account | GroupInvitation
Possible types​
AddedAccountToGroup.Account object​
A human user account in your organization.
Returned wherever the API exposes the people behind group memberships and
organization roster — for example as an element of Group.members and
Organization.members. Every account in the result set is already a
member of at least one group in the organization.
AddedAccountToGroup.GroupInvitation object​
A pending invitation for a user to join a group.
Invitations are sent by email. The invited user must accept the invitation to become a group member. Pending invitations can be revoked by an organization admin before they are accepted.
Member Of​
AddedAccountToGroupPayload object