createOrganizationInvitationBulkWithHttpInfo method
- String organizationId,
- List<
CreateOrganizationInvitationRequest> createOrganizationInvitationRequest
Bulk create and send organization invitations
Creates new organization invitations in bulk and sends out emails to the provided email addresses with a link to accept the invitation and join the organization. You can specify a different role
for each invited organization member. New organization invitations get a "pending" status until they are revoked by an organization administrator or accepted by the invitee. The request body supports passing an optional redirect_url
parameter for each invitation. When the invited user clicks the link to accept the invitation, they will be redirected to the provided URL. Use this parameter to implement a custom invitation acceptance flow. You can specify the ID of the user that will send the invitation with the inviter_user_id
parameter. Each invitation can have a different inviter user. Inviter users must be members with administrator privileges in the organization. Only "admin" members can create organization invitations. You can optionally provide public and private metadata for each organization invitation. The public metadata are visible by both the Frontend and the Backend, whereas the private metadata are only visible by the Backend. When the organization invitation is accepted, the metadata will be transferred to the newly created organization membership.
Note: This method returns the HTTP Response
.
Parameters:
-
String organizationId (required): The organization ID.
-
List<CreateOrganizationInvitationRequest> createOrganizationInvitationRequest (required):
Implementation
Future<http.Response> createOrganizationInvitationBulkWithHttpInfo(
String organizationId,
List<CreateOrganizationInvitationRequest>
createOrganizationInvitationRequest,
) async {
// ignore: prefer_const_declarations
final path = r'/organizations/{organization_id}/invitations/bulk'
.replaceAll('{organization_id}', organizationId);
// ignore: prefer_final_locals
Object? postBody = createOrganizationInvitationRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}