# OrganizationWebhooksApi

All URIs are relative to *https://admin-api.connected.dev*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createOrganizationWebhook**](#createorganizationwebhook) | **POST** /organization/webhooks | Create an organization webhook|
|[**deleteOrganizationWebhook**](#deleteorganizationwebhook) | **DELETE** /organization/webhooks/{webhookId} | Delete an organization webhook|
|[**getOrganizationWebhook**](#getorganizationwebhook) | **GET** /organization/webhooks/{webhookId} | Get an organization webhook|
|[**getOrganizationWebhooks**](#getorganizationwebhooks) | **GET** /organization/webhooks | List an organization\&#39;s webhooks|
|[**updateOrganizationWebhook**](#updateorganizationwebhook) | **PUT** /organization/webhooks/{webhookId} | Update an organization webhook|
|[**verifyOrganizationWebhook**](#verifyorganizationwebhook) | **POST** /organization/webhooks/{webhookId}/verify | Verify an organization webhook endpoint|

# **createOrganizationWebhook**
> AddEventPassChangeWebhook200Response createOrganizationWebhook(webhookCreateInputs)

Registers a new outbound webhook endpoint for the organization with a name, URL, and secret, requires organization read and update permissions; the new webhook starts unverified until the verify endpoint is called.

### Example

```typescript
import {
    OrganizationWebhooksApi,
    Configuration,
    WebhookCreateInputs
} from '@connectedxm/admin-sdk';

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

let webhookCreateInputs: WebhookCreateInputs; //

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **webhookCreateInputs** | **WebhookCreateInputs**|  | |


### Return type

**AddEventPassChangeWebhook200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[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)

# **deleteOrganizationWebhook**
> CreateAccountInvitations200Response deleteOrganizationWebhook()

Permanently removes the specified webhook endpoint from the organization so it no longer receives event deliveries, requires organization read and update permissions.

### Example

```typescript
import {
    OrganizationWebhooksApi,
    Configuration
} from '@connectedxm/admin-sdk';

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

let webhookId: string; //The webhook identifier (default to undefined)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **webhookId** | [**string**] | The webhook identifier | defaults to undefined|


### Return type

**CreateAccountInvitations200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[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)

# **getOrganizationWebhook**
> AddEventPassChangeWebhook200Response getOrganizationWebhook()

Retrieves a single outbound webhook configuration by ID for the current organization, including its URL, subscribed events, and status; requires read permission on the org resource.

### Example

```typescript
import {
    OrganizationWebhooksApi,
    Configuration
} from '@connectedxm/admin-sdk';

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

let webhookId: string; //The webhook identifier (default to undefined)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **webhookId** | [**string**] | The webhook identifier | defaults to undefined|


### Return type

**AddEventPassChangeWebhook200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[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)

# **getOrganizationWebhooks**
> GetEventPassChangeWebhooks200Response getOrganizationWebhooks()

Returns a paginated, searchable list of outbound webhook configurations registered for the current organization, matching on name, URL, or ID and supporting sorting via orderBy; requires read permission on the org resource.

### Example

```typescript
import {
    OrganizationWebhooksApi,
    Configuration
} from '@connectedxm/admin-sdk';

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

let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getOrganizationWebhooks(
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetEventPassChangeWebhooks200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[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)

# **updateOrganizationWebhook**
> AddEventPassChangeWebhook200Response updateOrganizationWebhook(webhookUpdateInputs)

Modifies an existing webhook\'s name, URL, secret, or other settings for the organization, requires organization read and update permissions.

### Example

```typescript
import {
    OrganizationWebhooksApi,
    Configuration,
    WebhookUpdateInputs
} from '@connectedxm/admin-sdk';

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

let webhookId: string; //The webhook identifier (default to undefined)
let webhookUpdateInputs: WebhookUpdateInputs; //

const { status, data } = await apiInstance.updateOrganizationWebhook(
    webhookId,
    webhookUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **webhookUpdateInputs** | **WebhookUpdateInputs**|  | |
| **webhookId** | [**string**] | The webhook identifier | defaults to undefined|


### Return type

**AddEventPassChangeWebhook200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[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)

# **verifyOrganizationWebhook**
> AddEventPassChangeWebhook200Response verifyOrganizationWebhook()

Sends a signed test payload to the webhook\'s URL and, if delivery succeeds, marks the webhook as verified so it can start receiving real event deliveries, requires organization read and update permissions.

### Example

```typescript
import {
    OrganizationWebhooksApi,
    Configuration
} from '@connectedxm/admin-sdk';

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

let webhookId: string; //The webhook identifier (default to undefined)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **webhookId** | [**string**] | The webhook identifier | defaults to undefined|


### Return type

**AddEventPassChangeWebhook200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[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)

