dkyle88 | Posts: 7

Creating Groups

0 votes
I just had groups enabled on my account and am wanting to create them and invite signers to the groups. Does anyone have an example of how to do this?

harishaidary | Posts: 1812

Reply to: Creating Groups

0 votes
The code below will do trick. Let me know if you run into any issues.
public static void Main(string[] args)
        {
            EslClient eslClient = new EslClient(apiKey, apiUrl);

            Group emptyGroup = GroupBuilder.NewGroup(Guid.NewGuid().ToString())
                .WithEmail("[email protected]")
                .WithoutIndividualMemberEmailing()
                .Build();
            Group createdEmptyGroup = eslClient.GroupService.CreateGroup(emptyGroup);

            eslClient.GroupService.InviteMember(createdEmptyGroup.Id,
                GroupMemberBuilder.NewGroupMember("[email protected]")
                 .AsMemberType(GroupMemberType.MANAGER)
                .Build());
        }

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off