postWebhookWithHttpInfo method
Registers a new webhook subscription for the caller's org and answers 201 with the endpoint INCLUDING its freshly minted signing secret.
Registers a new webhook subscription for the caller's org and answers 201 with the endpoint INCLUDING its freshly minted signing secret. This is one of only two responses that ever carry that secret (the other is rotate) — store it now, because no later read returns it. The org is stamped by the server from the validated principal, so a body can never register an endpoint in another tenant.
Note: This method returns the HTTP Response.
Parameters:
- CreateEndpointIn createEndpointIn (required):
Implementation
Future<Response> postWebhookWithHttpInfo(CreateEndpointIn createEndpointIn,) async {
// ignore: prefer_const_declarations
final path = r'/v1/webhook';
// ignore: prefer_final_locals
Object? postBody = createEndpointIn;
final queryParams = <QueryParam>[];
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,
);
}