---
title: WebhookGroups
editUrl: false
head: []
template: doc
prev: false
next: false
sidebar:
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

Defined in: [src/webhooks/client.gen.ts:8](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/webhooks/client.gen.ts#L8)

## Constructors

### Constructor

> **new WebhookGroups**(`_core`): `WebhookGroups`

Defined in: [src/webhooks/client.gen.ts:9](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/webhooks/client.gen.ts#L9)

#### Parameters

##### \_core

[`BrexCore`](/brex/api/index/classes/brexcore/)

#### Returns

`WebhookGroups`

## Methods

### addMembers()

> **addMembers**(`id`, `body`, `options?`): `Promise`\<`void`\>

Defined in: [src/webhooks/client.gen.ts:18](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/webhooks/client.gen.ts#L18)

Add Webhook Group Members

Adds members to webhook groups.

`POST /v1/webhooks/groups/{id}/add_members`

#### Parameters

##### id

`string`

##### body

###### members

`object`[]

**Description**

The list of webhook group members to add to the group.

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<`void`\>

***

### create()

> **create**(`body`, `options?`): `Promise`\<\{ `id`: `string`; `name`: `string`; \}\>

Defined in: [src/webhooks/client.gen.ts:40](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/webhooks/client.gen.ts#L40)

Create Webhook Group

Creates a webhook group.

`POST /v1/webhooks/groups`
Sends an `Idempotency-Key` header: `options.idempotencyKey`, or an auto-generated UUID.

#### Parameters

##### body

###### name

`string`

**Description**

The name for the webhook group.

**Example**

```ts
Some Webhook Group
```

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `id`: `string`; `name`: `string`; \}\>

***

### delete()

> **delete**(`id`, `options?`): `Promise`\<`void`\>

Defined in: [src/webhooks/client.gen.ts:60](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/webhooks/client.gen.ts#L60)

Delete Webhook Group

Deletes a webhook group and all its members.

`DELETE /v1/webhooks/groups/{id}`

#### Parameters

##### id

`string`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<`void`\>

***

### get()

> **get**(`id`, `options?`): `Promise`\<\{ `id`: `string`; `name`: `string`; \}\>

Defined in: [src/webhooks/client.gen.ts:76](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/webhooks/client.gen.ts#L76)

Get Webhook Group

Gets a webhook group.

`GET /v1/webhooks/groups/{id}`

#### Parameters

##### id

`string`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `id`: `string`; `name`: `string`; \}\>

***

### list()

> **list**(`query?`, `options?`): [`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

Defined in: [src/webhooks/client.gen.ts:95](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/webhooks/client.gen.ts#L95)

List Webhook Groups

Lists webhook groups.

`GET /v1/webhooks/groups`
Await for a single page, or `for await` to iterate items across all pages.

#### Parameters

##### query?

###### cursor?

`string` \| `null`

**Description**

Cursor for pagination.

###### limit?

`number`

**Description**

Limit for pagination. If not provided, defaults to 100. Cannot be greater than 1000.

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

[`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

***

### listMembers()

> **listMembers**(`id`, `query?`, `options?`): [`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

Defined in: [src/webhooks/client.gen.ts:114](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/webhooks/client.gen.ts#L114)

List Webhook Group Members

Lists the members currently in the specified webhook group.

`GET /v1/webhooks/groups/{id}/members`
Await for a single page, or `for await` to iterate items across all pages.

#### Parameters

##### id

`string`

##### query?

###### cursor?

`string` \| `null`

**Description**

Cursor for pagination.

###### limit?

`number`

**Description**

Limit for pagination. If not provided, defaults to 100. Cannot be greater than 1000.

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

[`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

***

### removeMembers()

> **removeMembers**(`id`, `body`, `options?`): `Promise`\<`void`\>

Defined in: [src/webhooks/client.gen.ts:133](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/webhooks/client.gen.ts#L133)

Remove Webhook Group Members

Removes members from webhook groups.

`POST /v1/webhooks/groups/{id}/remove_members`

#### Parameters

##### id

`string`

##### body

###### members

`object`[]

**Description**

The list of webhook group members to remove from the group.

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<`void`\>