InitiateInvite()

Initiate Invite

Description

Invites a user to join an organization.

Package Details

Interface

IServiceInvitationManager

Syntax

await ServiceInvitationManager.InitiateInvite(int userId, string email, int serviceId, int? organizationId, bool isEnglish, string returnUrl = null);

Returns

Task<InviteInitiationContext>

API

Implementation Notes

Internal users must not be associated with any organizations.

POST
/api/v1/services/{serviceId}/initiate-invite

Parameters

Parameter

Description

Parameter Type

Parameter

Description

Parameter Type

Id

The service id

path

userId

User's id

query string

email

User's email

query string

organizationId

Organization id

query string

isEnglish

Indicates the current language true or false are the only 2 values accepted

query string

returnUrl

The return url which the user should be returned to after completing the process

query string

Returns

200 OK - Invite Initiation Context

Example

const int userId = 123; const string email = "noreply@tc.gc.ca"; const int serviceId = 11; const int organizationId = 100; const string returnUrl = "<https://tc.gc.ca>"; var invite = await _serviceInvitationManager.InitiateInvite(userId, email, serviceId, organizationId, true, returnUrl);