# WebhookApi

All URIs are relative to *http://localhost:8080/api/v1*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**webhooksGet**](#webhooksget) | **GET** /webhooks | List webhooks|
|[**webhooksIdDelete**](#webhooksiddelete) | **DELETE** /webhooks/{id} | Delete webhook|
|[**webhooksIdRegenerateKeyPost**](#webhooksidregeneratekeypost) | **POST** /webhooks/{id}/regenerate-key | Regenerate webhook API key|
|[**webhooksIdTestPost**](#webhooksidtestpost) | **POST** /webhooks/{id}/test | Test webhook|
|[**webhooksPost**](#webhookspost) | **POST** /webhooks | Register webhook|
|[**webhooksStatsGet**](#webhooksstatsget) | **GET** /webhooks/stats | Get webhook statistics|

# **webhooksGet**
> WebhooksGet200Response webhooksGet()

Get a list of all webhooks registered by the current user

### Example

```typescript
import {
    WebhookApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new WebhookApi(configuration);

const { status, data } = await apiInstance.webhooksGet();
```

### Parameters
This endpoint does not have any parameters.


### Return type

**WebhooksGet200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**401** | Unauthorized |  -  |
|**500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **webhooksIdDelete**
> AnalyticsEventsPost200Response webhooksIdDelete()

Delete a webhook by ID

### Example

```typescript
import {
    WebhookApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new WebhookApi(configuration);

let id: string; //Webhook ID (default to undefined)

const { status, data } = await apiInstance.webhooksIdDelete(
    id
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | Webhook ID | defaults to undefined|


### Return type

**AnalyticsEventsPost200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Invalid webhook ID |  -  |
|**401** | Unauthorized |  -  |
|**404** | Webhook not found |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **webhooksIdRegenerateKeyPost**
> WebhooksIdRegenerateKeyPost200Response webhooksIdRegenerateKeyPost()

Generate a new API key for a webhook (invalidates the old one)

### Example

```typescript
import {
    WebhookApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new WebhookApi(configuration);

let id: string; //Webhook ID (default to undefined)

const { status, data } = await apiInstance.webhooksIdRegenerateKeyPost(
    id
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | Webhook ID | defaults to undefined|


### Return type

**WebhooksIdRegenerateKeyPost200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Invalid webhook ID |  -  |
|**401** | Unauthorized |  -  |
|**404** | Webhook not found |  -  |
|**500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **webhooksIdTestPost**
> AnalyticsEventsPost200Response webhooksIdTestPost()

Send a test event to a webhook to verify it\'s working

### Example

```typescript
import {
    WebhookApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new WebhookApi(configuration);

let id: string; //Webhook ID (default to undefined)

const { status, data } = await apiInstance.webhooksIdTestPost(
    id
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **id** | [**string**] | Webhook ID | defaults to undefined|


### Return type

**AnalyticsEventsPost200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Invalid webhook ID |  -  |
|**401** | Unauthorized |  -  |
|**404** | Webhook not found |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **webhooksPost**
> WebhooksPost201Response webhooksPost(webhook)

Register a new webhook for receiving events

### Example

```typescript
import {
    WebhookApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new WebhookApi(configuration);

let webhook: object; //Webhook registration data

const { status, data } = await apiInstance.webhooksPost(
    webhook
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **webhook** | **object**| Webhook registration data | |


### Return type

**WebhooksPost201Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Created |  -  |
|**400** | Validation error |  -  |
|**401** | Unauthorized |  -  |
|**500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **webhooksStatsGet**
> AuditStatsGet200Response webhooksStatsGet()

Get statistics for webhook delivery and performance

### Example

```typescript
import {
    WebhookApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new WebhookApi(configuration);

const { status, data } = await apiInstance.webhooksStatsGet();
```

### Parameters
This endpoint does not have any parameters.


### Return type

**AuditStatsGet200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**401** | Unauthorized |  -  |
|**500** | Internal server error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

