aiBotV1BotsWebhooksWhatsappCreateWithHttpInfo method
Future<Response>
aiBotV1BotsWebhooksWhatsappCreateWithHttpInfo(
- String org,
- WhatAppWebHook whatAppWebHook
Webhook endpoint to receive and process whatsapp messages.
Note: This method returns the HTTP Response.
Parameters:
-
String org (required):
-
WhatAppWebHook whatAppWebHook (required):
Implementation
Future<Response> aiBotV1BotsWebhooksWhatsappCreateWithHttpInfo(String org, WhatAppWebHook whatAppWebHook,) async {
// ignore: prefer_const_declarations
final path = r'/api/ai/bot/v1/bots/webhooks/{org}/whatsapp/'
.replaceAll('{org}', org);
// ignore: prefer_final_locals
Object? postBody = whatAppWebHook;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json', 'multipart/form-data', 'application/x-www-form-urlencoded'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}