# Accounting API The Accounting API allows you to manage accounting data for connecting to your accounting system. The Accounting API is currently in Alpha. To access the Accounting Alpha API, please email developer-support@brex.com to express your interest. Please note that participation is determined by Brex based on program needs. For more details, please refer to https://developer.brex.com/docs/api-launch-stages/. Version: 1.0.0-alpha ## 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 Type: oauth2 ## Download OpenAPI description [Accounting API](https://developer.brex.com/_bundle/openapi/accounting_api.yaml) ## Accounting Integrations View and manage accounting integrations. ### Create accounting integration - [POST /v3/accounting/integration](https://developer.brex.com/openapi/accounting_api/accounting-integrations/createintegration.md): Create a new accounting integration. The behavior depends on the existing active integration: - If no active integration exists: Creates and returns new integration - If active integration exists with same vendor and vendor_account_id: Returns the existing active integration - If active integration exists with same vendor but different vendor_account_id: Returns 409 error - If active integration exists with different vendor: Returns 409 error This ensures only one active integration exists per account. ### Disconnect accounting integration - [POST /v3/accounting/integration/{integration_id}/disconnect](https://developer.brex.com/openapi/accounting_api/accounting-integrations/disconnectintegration.md): Disconnect an active accounting integration. - If integration is ACTIVE: Disconnects and returns success - If integration ID doesn't exist: Returns 404 error - If integration is not currently active: Returns 409 error ### Reactivate accounting integration - [POST /v3/accounting/integration/{integration_id}/reactivate](https://developer.brex.com/openapi/accounting_api/accounting-integrations/reactivateintegration.md): Reactivate a disconnected accounting integration. - If integration is DISABLED: Reactivates and returns success - If integration ID doesn't exist: Returns 404 error - If an active integration already exists: Returns 409 error ## Accounting Records View and manage accounting records. ### Get accounting record by ID - [GET /v3/accounting/records/{record_id}](https://developer.brex.com/openapi/accounting_api/accounting-records/getaccountingrecord.md): Retrieve a single accounting record by its unique identifier ### Query accounting records - [GET /v3/accounting/records](https://developer.brex.com/openapi/accounting_api/accounting-records/queryaccountingrecords.md): Query accounting records by IDs or with filters for polling. When building integrations with Brex accounting workflow, use filter-based polling as a fallback mechanism. Suggested cadence is 1 hour. For card and reimbursement records: Use review_status to filter by accounting workflow stage (e.g., READY_FOR_EXPORT, EXPORTED). For bill records: Use source_type=BILL with updated_at[gt] to poll for updated bill records. Filter Constraints: - review_status is only supported with CARD and REIMBURSEMENT source types ### Report accounting export results - [POST /v3/accounting/records/export-results](https://developer.brex.com/openapi/accounting_api/accounting-records/reportaccountingexportresults.md): Report export success or failure for accounting records.