Webhook Groups

Webhooks API (0.1)

Brex uses webhooks to send real-time notifications when events happen in the accounts that you manage. Use webhook subscriptions to subscribe to different webhook events.

Staging (Note: This is not a sandbox. It will not work with customer tokens.)

https://api-staging.brex.com

Webhook Subscriptions

Manage webhook subscriptions.

List Webhook Groups

Request

Query

limitinteger(int32)[ 0 .. 1000 ]

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

Default 100

curl -i -X GET \
  https://api.brex.com/v1/webhooks/groups \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json

next_cursorstring or null

itemsArray of objects(Webhook Group)required

items[].​idstringnon-emptyrequired

The ID of the webhook group.

Example: "wg_123"

items[].​namestringnon-emptyrequired

The name for the webhook group.

Example: "Some Webhook Group"

{

"next_cursor": "string",

"items":

[

{

}

]

}

Was this helpful?

Create Webhook Group

Request

Headers

Idempotency-Keystringrequired

Bodyapplication/jsonrequired

namestringrequired

The name for the webhook group.

Example: "Some Webhook Group"

curl -i -X POST \
  https://api.brex.com/v1/webhooks/groups \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: string' \
  -d '{
    "name": "Some Webhook Group"
  }'

Responses

Bodyapplication/json

idstringnon-emptyrequired

The ID of the webhook group.

Example: "wg_123"

namestringnon-emptyrequired

The name for the webhook group.

Example: "Some Webhook Group"

{

"id": "wg_123",

"name": "Some Webhook Group"

}

Was this helpful?

Get Webhook Group

Request

Path

idstringrequired

The ID of the webhook group to retrieve.

curl -i -X GET \
  'https://api.brex.com/v1/webhooks/groups/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json

idstringnon-emptyrequired

The ID of the webhook group.

Example: "wg_123"

namestringnon-emptyrequired

The name for the webhook group.

Example: "Some Webhook Group"

{

"id": "wg_123",

"name": "Some Webhook Group"

}

Was this helpful?

Delete Webhook Group

Request

Deletes a webhook group and all its members.

Path

idstringrequired

The ID of the webhook group to delete.

curl -i -X DELETE \
  'https://api.brex.com/v1/webhooks/groups/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Was this helpful?

Add Webhook Group Members

Request

Adds members to webhook groups.

Path

idstringrequired

The ID of the webhook group to add members to.

Bodyapplication/jsonrequired

membersArray of objects(WebhookGroupMemberInput)non-emptyrequired

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

members[].​member_typestringrequired

The type of a webhook group member.

ValueDescription
ACCOUNT

The webhook group member is a customer account.

members[].​member_idstringnon-emptyrequired

The ID of the webhook group member.

curl -i -X POST \
  'https://api.brex.com/v1/webhooks/groups/{id}/add_members' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "members": [
      {
        "member_type": "ACCOUNT",
        "member_id": "string"
      }
    ]
  }'

Responses

Was this helpful?

List Webhook Group Members

Request

Lists the members currently in the specified webhook group.

Path

idstringrequired

The ID of the webhook group to retrieve members for.

Query

limitinteger(int32)[ 0 .. 1000 ]

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

Default 100

curl -i -X GET \
  'https://api.brex.com/v1/webhooks/groups/{id}/members' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json

next_cursorstring or null

itemsArray of objects(Webhook Group Member)required

items[].​group_idstringnon-emptyrequired

The ID of the webhook group this member belongs to.

Example: "wg_123"

items[].​member_typestringrequired

The type of a webhook group member.

ValueDescription
ACCOUNT

The webhook group member is a customer account.

Example: "ACCOUNT"

items[].​member_idstringnon-emptyrequired

The ID of the webhook group member.

Example: "cuacc_123"

{

"next_cursor": "string",

"items":

[

{

}

]

}

Was this helpful?

Remove Webhook Group Members

Request

Removes members from webhook groups.

Path

idstringrequired

The ID of the webhook group to remove members from.

Bodyapplication/jsonrequired

membersArray of objects(WebhookGroupMemberInput)non-emptyrequired

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

members[].​member_typestringrequired

The type of a webhook group member.

ValueDescription
ACCOUNT

The webhook group member is a customer account.

members[].​member_idstringnon-emptyrequired

The ID of the webhook group member.

curl -i -X POST \
  'https://api.brex.com/v1/webhooks/groups/{id}/remove_members' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "members": [
      {
        "member_type": "ACCOUNT",
        "member_id": "string"
      }
    ]
  }'

Responses

Was this helpful?

Schemas

Webhook Events