async createWebhook(inboxId, webhookOptions) {
      let postBody = webhookOptions;
      // verify the required parameter 'inboxId' is set
      if (inboxId === undefined || inboxId === null) {
        throw new Error("Missing the required parameter 'inboxId' when calling createWebhook");
      }
      // verify the required parameter 'webhookOptions' is set
      if (webhookOptions === undefined || webhookOptions === null) {
        throw new Error("Missing the required parameter 'webhookOptions' when calling createWebhook");
      }

      let pathParams = {
        'inboxId': inboxId
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['API_KEY'];
      let contentTypes = ['application/json'];
      let accepts = ['application/json'];
      let returnType = WebhookDto;

      return this.callApi(
        '/inboxes/{inboxId}/webhooks', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }
/**
     * Attach a WebHook URL to an inbox
     * Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
     * @param {String} inboxId inboxId
     * @param {CreateWebhookOptions} webhookOptions webhookOptions
     * @return {Promise<WebhookDto>}
     */
Attach a WebHook URL to an inbox
Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
@param {String} inboxId inboxId
@param {CreateWebhookOptions} webhookOptions webhookOptions
@return {Promise}
Attach a WebHook URL to an inbox Get notified whenever an inbox receives an email via a WebHook URL . An emailID will be posted to this URL every time an email is received for this inbox . The URL must be publicly reachable by the MailSlurp server . You can provide basicAuth values if you wish to secure this endpoint . @param { String } inboxId inboxId @param { CreateWebhookOptions } webhookOptions webhookOptions @return { Promise }
async createWebhook(inboxId, webhookOptions) {
      let postBody = webhookOptions;
      if (inboxId === undefined || inboxId === null) {
        throw new Error("Missing the required parameter 'inboxId' when calling createWebhook");
      }
      if (webhookOptions === undefined || webhookOptions === null) {
        throw new Error("Missing the required parameter 'webhookOptions' when calling createWebhook");
      }
      let pathParams = {
        'inboxId': inboxId
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };
      let authNames = ['API_KEY'];
      let contentTypes = ['application/json'];
      let accepts = ['application/json'];
      let returnType = WebhookDto;
      return this.callApi(
        '/inboxes/{inboxId}/webhooks', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }
async createWebhook ( inboxId , webhookOptions ) { let postBody = webhookOptions ; if ( inboxId === undefined || inboxId === null ) { throw new Error ( "Missing the required parameter 'inboxId' when calling createWebhook" ) ; } if ( webhookOptions === undefined || webhookOptions === null ) { throw new Error ( "Missing the required parameter 'webhookOptions' when calling createWebhook" ) ; } let pathParams = { 'inboxId' : inboxId } ; let queryParams = { } ; let headerParams = { } ; let formParams = { } ; let authNames = [ 'API_KEY' ] ; let contentTypes = [ 'application/json' ] ; let accepts = [ 'application/json' ] ; let returnType = WebhookDto ; return this . callApi ( '/inboxes/{inboxId}/webhooks' , 'POST' , pathParams , queryParams , headerParams , formParams , postBody , authNames , contentTypes , accepts , returnType ) ; }
Attach a WebHook URL to an inbox
 Get notified whenever an inbox receives an email via a WebHook URL.
Attach a WebHook URL to an inbox Get notified whenever an inbox receives an email via a WebHook URL .
// verify the required parameter 'inboxId' is set // verify the required parameter 'webhookOptions' is set