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.
Webhook Groups
Webhooks API (0.1)
Staging (Note: This is not a sandbox. It will not work with customer tokens.)
https://api-staging.brex.com
curl -i -X GET \
https://api.brex.com/v1/webhooks/groups \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{
"next_cursor": "string",
"items":
[
{
…
}
]
}
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"
}'curl -i -X GET \
'https://api.brex.com/v1/webhooks/groups/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'curl -i -X DELETE \
'https://api.brex.com/v1/webhooks/groups/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'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"
}
]
}'curl -i -X GET \
'https://api.brex.com/v1/webhooks/groups/{id}/members' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{
"next_cursor": "string",
"items":
[
{
…
}
]
}
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"
}
]
}'