# egoisdk.WebHooksApi All URIs are relative to *https://api.egoiapp.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**createWebhook**](WebHooksApi.md#createWebhook) | **POST** /webhooks | Create new webhook [**deleteWebhook**](WebHooksApi.md#deleteWebhook) | **DELETE** /webhooks/{webhook_id} | Remove webhook [**getAllWebhooks**](WebHooksApi.md#getAllWebhooks) | **GET** /webhooks | Get all webhooks ## createWebhook > Webhook createWebhook(webhook) Create new webhook Create a new webhook <a href='/usecases/webhooks/' target='_blank'>[Go to webhooks documentation]</a> ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.WebHooksApi(); let webhook = new egoisdk.Webhook(); // Webhook | Parameters for the webhook apiInstance.createWebhook(webhook, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **webhook** | [**Webhook**](Webhook.md)| Parameters for the webhook | ### Return type [**Webhook**](Webhook.md) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## deleteWebhook > deleteWebhook(webhookId) Remove webhook Remove webhook information given its ID ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.WebHooksApi(); let webhookId = 56; // Number | ID of the Webhook apiInstance.deleteWebhook(webhookId, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully.'); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **webhookId** | **Number**| ID of the Webhook | ### Return type null (empty response body) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## getAllWebhooks > ListCollection1 getAllWebhooks(opts) Get all webhooks Returns all webhooks <a href='/usecases/webhooks/' target='_blank'>[Go to webhooks documentation]</a> ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.WebHooksApi(); let opts = { 'offset': 56, // Number | Element offset (starting at zero for the first element) 'limit': 10 // Number | Number of items to return }; apiInstance.getAllWebhooks(opts, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **offset** | **Number**| Element offset (starting at zero for the first element) | [optional] **limit** | **Number**| Number of items to return | [optional] [default to 10] ### Return type [**ListCollection1**](ListCollection1.md) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json