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.
Webhooks API (0.1)
Download OpenAPI description
Overview
Languages
Servers
Production
https://api.brex.com
Staging (Note: This is not a sandbox. It will not work with customer tokens.)
https://api-staging.brex.com
- Productionhttps://api.brex.com/v1/webhooks/groups
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/webhooks/groups
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X GET \
https://api.brex.com/v1/webhooks/groups \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
application/json
{ "next_cursor": "string", "items": [ { … } ] }
- Productionhttps://api.brex.com/v1/webhooks/groups
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/webhooks/groups
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
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"
}'Response
application/json
{ "id": "wg_123", "name": "Some Webhook Group" }
- Productionhttps://api.brex.com/v1/webhooks/groups/{id}
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/webhooks/groups/{id}
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X GET \
'https://api.brex.com/v1/webhooks/groups/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
application/json
{ "id": "wg_123", "name": "Some Webhook Group" }
- Productionhttps://api.brex.com/v1/webhooks/groups/{id}
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/webhooks/groups/{id}
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X DELETE \
'https://api.brex.com/v1/webhooks/groups/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- Productionhttps://api.brex.com/v1/webhooks/groups/{id}/add_members
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/webhooks/groups/{id}/add_members
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
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"
}
]
}'- Productionhttps://api.brex.com/v1/webhooks/groups/{id}/members
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/webhooks/groups/{id}/members
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
curl -i -X GET \
'https://api.brex.com/v1/webhooks/groups/{id}/members' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
application/json
{ "next_cursor": "string", "items": [ { … } ] }
- Productionhttps://api.brex.com/v1/webhooks/groups/{id}/remove_members
- Staging (Note: This is not a sandbox. It will not work with customer tokens.)https://api-staging.brex.com/v1/webhooks/groups/{id}/remove_members
- curl
- JavaScript
- Node.js
- Python
- Ruby
- Java
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"
}
]
}'