replyEmailWithHttpInfo method
Future<Response>
replyEmailWithHttpInfo(
- String messageId,
- ReplyEmailRequest replyEmailRequest, {
- String? xWorkspaceID,
Reply to a specific email.
The original message is identified by ?messageId=. Body defaults to the original sender as recipient — pass to, cc, bcc to override.
Note: This method returns the HTTP Response.
Parameters:
-
String messageId (required): Id of the message being replied to.
-
ReplyEmailRequest replyEmailRequest (required):
-
String xWorkspaceID: Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
Implementation
Future<Response> replyEmailWithHttpInfo(String messageId, ReplyEmailRequest replyEmailRequest, { String? xWorkspaceID, }) async {
// ignore: prefer_const_declarations
final path = r'/v1/mail/reply';
// ignore: prefer_final_locals
Object? postBody = replyEmailRequest;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'messageId', messageId));
if (xWorkspaceID != null) {
headerParams[r'X-Workspace-ID'] = parameterToString(xWorkspaceID);
}
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}