createOutgoingWebhookWithHttpInfo method

Future<Response> createOutgoingWebhookWithHttpInfo(
  1. MmCreateOutgoingWebhookRequest mmCreateOutgoingWebhookRequest
)

Create an outgoing webhook

Create an outgoing webhook for a team. ##### Permissions manage_webhooks for the team the webhook is in. manage_others_outgoing_webhooks for the team the webhook is in if the user is different than the requester.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> createOutgoingWebhookWithHttpInfo(
  MmCreateOutgoingWebhookRequest mmCreateOutgoingWebhookRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/hooks/outgoing';

  // ignore: prefer_final_locals
  Object? postBody = mmCreateOutgoingWebhookRequest;

  final queryParams = <MmQueryParam>[];
  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,
  );
}