sendInvites method

Future<void> sendInvites({
  1. required List<String> accessorIds,
  2. required String body,
  3. required String spaceId,
  4. required String title,
})

Sends an invitation email to selected users and groups.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter accessorIds : The array of identifiers for the users and groups.

Parameter body : The body of the invite.

Parameter spaceId : The ID of the private re:Post.

Parameter title : The title of the invite.

Implementation

Future<void> sendInvites({
  required List<String> accessorIds,
  required String body,
  required String spaceId,
  required String title,
}) async {
  final $payload = <String, dynamic>{
    'accessorIds': accessorIds,
    'body': body,
    'title': title,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/spaces/${Uri.encodeComponent(spaceId)}/invite',
    exceptionFnMap: _exceptionFns,
  );
}