# Webhooks API 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. Version: 0.1 ## 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 ``` ## Security ### OAuth2 OAuth2 security scheme Type: oauth2 ## Download OpenAPI description [Webhooks API](https://developer.brex.com/_bundle/openapi/webhooks_api.yaml) ## Webhook Subscriptions Manage webhook subscriptions. ### List Webhooks - [GET /v1/webhooks](https://developer.brex.com/openapi/webhooks_api/webhook-subscriptions/listwebhooksubscriptions.md): List the webhooks you have registered ### Register Webhook - [POST /v1/webhooks](https://developer.brex.com/openapi/webhooks_api/webhook-subscriptions/createwebhooksubscription.md): Register an endpoint to start receiving selected webhook events ### List Webhook Secrets - [GET /v1/webhooks/secrets](https://developer.brex.com/openapi/webhooks_api/webhook-subscriptions/listwebhooksecrets.md): This endpoint returns a set of webhook signing secrets used to validate the webhook. Usually only one key will be returned in the response. After key rotation, this endpoint will return two keys: the new key, and the key that will be revoked soon. There will also be two signatures in the 'Webhook-Signature' request header. Your application should use all keys available to validate the webhook request. If validation passes for any of the keys returned, the webhook payload is valid. ### Get Webhook - [GET /v1/webhooks/{id}](https://developer.brex.com/openapi/webhooks_api/webhook-subscriptions/getwebhooksubscription.md): Get details of a webhook ### Update Webhook - [PUT /v1/webhooks/{id}](https://developer.brex.com/openapi/webhooks_api/webhook-subscriptions/updatewebhooksubscription.md): Update a webhook. You can update the endpoint url, event types that the endpoint receives, or temporarily deactivate the webhook. ### Unregister Webhook - [DELETE /v1/webhooks/{id}](https://developer.brex.com/openapi/webhooks_api/webhook-subscriptions/deletewebhooksubscription.md): Unregister a webhook if you want to stop receiving webhook events ## Webhook Groups Manage webhook groups. ### List Webhook Groups - [GET /v1/webhooks/groups](https://developer.brex.com/openapi/webhooks_api/webhook-groups/listwebhookgroups.md): Lists webhook groups. ### Create Webhook Group - [POST /v1/webhooks/groups](https://developer.brex.com/openapi/webhooks_api/webhook-groups/createwebhookgroup.md): Creates a webhook group. ### Get Webhook Group - [GET /v1/webhooks/groups/{id}](https://developer.brex.com/openapi/webhooks_api/webhook-groups/getwebhookgroup.md): Gets a webhook group. ### Delete Webhook Group - [DELETE /v1/webhooks/groups/{id}](https://developer.brex.com/openapi/webhooks_api/webhook-groups/deletewebhookgroup.md): Deletes a webhook group and all its members. ### Add Webhook Group Members - [POST /v1/webhooks/groups/{id}/add_members](https://developer.brex.com/openapi/webhooks_api/webhook-groups/addwebhookgroupmembers.md): Adds members to webhook groups. ### List Webhook Group Members - [GET /v1/webhooks/groups/{id}/members](https://developer.brex.com/openapi/webhooks_api/webhook-groups/listwebhookgroupmembers.md): Lists the members currently in the specified webhook group. ### Remove Webhook Group Members - [POST /v1/webhooks/groups/{id}/remove_members](https://developer.brex.com/openapi/webhooks_api/webhook-groups/removewebhookgroupmembers.md): Removes members from webhook groups. ## Webhook Events ### Expense Payment Updated Event - [POST /x-webhooks/expensePaymentUpdated](https://developer.brex.com/openapi/webhooks_api/webhook-events/expensepaymentupdatedevent.md): Expense activity on Brex Cards. ### Referral Activated Event - [POST /x-webhooks/referralActivated](https://developer.brex.com/openapi/webhooks_api/webhook-events/referralactivatedevent.md): A referral was activated. ### Referral Application Status Changed Event - [POST /x-webhooks/referralApplicationStatusChanged](https://developer.brex.com/openapi/webhooks_api/webhook-events/referralapplicationstatuschangedevent.md): A referral's application status changed. ### Referral Created Event - [POST /x-webhooks/referralCreated](https://developer.brex.com/openapi/webhooks_api/webhook-events/referralcreatedevent.md): A referral was created. ### Transfer Failed Event - [POST /x-webhooks/transferFailed](https://developer.brex.com/openapi/webhooks_api/webhook-events/transferfailedevent.md): Transfer failed events for both incoming and outgoing Brex Cash transactions. ### Transfer Processed Event - [POST /x-webhooks/transferProcessed](https://developer.brex.com/openapi/webhooks_api/webhook-events/transferprocessedevent.md): Transfer processed events for both incoming and outgoing Brex Cash transactions. ### User Updated Event - [POST /x-webhooks/userUpdated](https://developer.brex.com/openapi/webhooks_api/webhook-events/userupdatedevent.md): Updates on Brex users. ### Accounting Record Ready for Export Events (Alpha) - [POST /x-webhooks/accountingRecordReadyForExport](https://developer.brex.com/openapi/webhooks_api/webhook-events/accountingrecordreadyforexportevent.md): Accounting Record Ready for Export Events. When customer triggers an accounting export this event will be sent.