createUsers method
Create users in an existing organization.
Sign the provided TCreateUsersBody with the client's stamp function and submit the request (POST /public/v1/submit/create_users).
See also: stampCreateUsers.
Implementation
Future<TCreateUsersResponse> createUsers({
required TCreateUsersBody input,
}) async {
final body = packActivityBody(
bodyJson: input.toJson(),
fallbackOrganizationId: input.organizationId ??
config.organizationId ??
(throw Exception(
"Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
activityType: 'ACTIVITY_TYPE_CREATE_USERS_V3',
);
return await request<Map<String, dynamic>, TCreateUsersResponse>(
"/public/v1/submit/create_users",
body,
(json) => TCreateUsersResponse.fromJson(
transformActivityResponse(json, 'CreateUsers')));
}