Skip to content
Last update: June 21, 2022

Invite a member to join a consortium

To invite another member to join a Quorum Blockchain Service (QBS) consortium, send an invite using the QBS management API, specifying the Azure subscription ID and email address of the party to be invited, and the role of the invited participant within the consortium (OWNER or MEMBER).

The invitee receives an email containing a personal invitation code to use when they provision their QBS member in Azure.

After the invitee provisions the QBS member using the code, QBS peers the inviter’s and invitee’s members together using an Azure VNet, enabling the two QBS members to securely communicate with one another and share the ledger.

Send an invite

To invite another member to join an existing consortium, use the POST method on the Invites endpoint of the API.

API endpoint for sending an invite to join a consortium

The URI of the Invites endpoint is:

/subscriptions/{inviterSubscriptionId}/resourceGroups/{inviterResourceGroupName}/providers/ConsenSys.Blockchain/blockchainMembers/{inviterBlockchainMemberName}/invites
/subscriptions/{inviterSubscriptionID}/resourceGroups/QbsContosoGroup/providers/ConsenSys.Blockchain/blockchainMembers/QbsContosoApp/invites

This endpoint requires the following parameters:

  • {inviterSubscriptionId} - Subscription ID.
  • {inviterResourceGroupName} - Resource group name.
  • {inviterBlockchainMemberName} - Managed app name of the owner of the consortium to join.

The POST request body contains the invitee details:

  • inviteeSubscriptionId - Azure Subscription ID of the member being invited to join the consortium.
  • inviteeEmail - Email address of the member invited to join the consortium. It can’t be the same as the inviter.
  • inviteeRole - Role of the member invited to join the consortium (OWNER or MEMBER).
  • expireInDays - Number of days before invite expires.
  • inviterEmail - Your own email to get cc’d a copy of the invite. Use null to leave blank.
{
  "inviteeSubscriptionId": "{inviteeSubscriptionId}",
  "inviteeEmail": "[email protected]",
  "inviteeRole": "MEMBER",
  "expireInDays": 10,
  "inviterEmail": "[email protected]"
}

On successful completion of the request, the returned value in the response from the Invites endpoint contains the following information:

  • inviteCode - The invitation code to use to join an existing consortium.
  • inviterConsortium - The name of the consortium to join.
  • inviterMember - The name of the member inviting to join their consortium. Technically, this is the name of the QBS managed app in Azure.
  • inviteeSubscription - Azure subscription ID of the member invited to join the consortium.
  • inviteeRole - Role of the member invited to join the consortium (OWNER or MEMBER).
  • inviteeEmail - Email address of the member invited to join the consortium.

The response JSON payload has the following format:

{
  "inviteCode": "string",
  "inviterConsortium": "string",
  "inviterMember": "string",
  "inviteeSubscription": "string",
  "inviteeRole": "string",
  "inviteeEmail": "string",
  "inviterEmail": "string",
  "status": "string",
  "createdTimestamp": "string",
  "updatedTimestamp": "string",
  "expiryTimestamp": "string"
}

Code examples

curl -X POST https://management.onquorum.net/subscriptions/{inviterSubscriptionId}/resourceGroups/QbsContosoGroup/providers/ConsenSys.Blockchain/blockchainMembers/QbsContosoApp/invites
-H 'Content-Type: application/json'
-d '{ "inviteeSubscriptionId": "{inviteeSubscriptionId}", "inviteeEmail": "[email protected]", "inviteeRole": "MEMBER", "expireInDays": 10, "inviterEmail": "[email protected]" }'
const subscriptionId = '{inviterSubscriptionId}';
const resourceGroup = 'QbsContosoGroup';
const appName = 'QbsContosoApp';

const inviteRequest = {
    inviterEmail = '[email protected]', // inviter email address - or leave it null
    inviteeSubscriptionId = '{inviteeSubscriptionId}',  // Azure subscription ID of the invited member
    inviteeEmail = '[email protected]', // email address of the invited member
    inviteeRole = 'MEMBER', // MEMBER or OWNER
    expireInDays = 10 // number of days of validity for this invite
};

async function createInvite() {
    const response = await fetch(
        `https://management.onquorum.net/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/ConsenSys.Blockchain/blockchainMembers/${appName}/invites`
        {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json'
            },
            body: JSON.stringify(inviteRequest)
        }
    );

    return response.json();
}
readonly Guid subscriptionId = Guid.Parse("{inviterSubscriptionId}");
readonly string resourceGroup = "QbsContosoGroup";
readonly string appName = "QbsContosoApp";

var inviteRequest = new InviteCreateRequestBody
{
    InviterEmail = "[email protected]", // inviter email address - or leave it null
    InviteeSubscriptionId = Guid.Parse("{inviteeSubscriptionId}"),  // Azure subscription ID of the invited member
    InviteeEmail = "[email protected]", // email address of the invited member
    InviteeRole = "MEMBER", // MEMBER or OWNER
    ExpireInDays = 10 // number of days of validity for this invite
};
var invite = await qbs.CreateInviteAsync(subscriptionId, resourceGroup, appName, inviteRequest);

Console.WriteLine($"Invite Code: {invite.InviteCode}");
Back to top