# Expenses API The Expenses API allows you to manage accounting and expenses information. 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 [Expenses API](https://developer.brex.com/_bundle/openapi/expenses_api.yaml) ## Card Expenses View and manage card expenses data. ### Update an expense - [PUT /v1/expenses/card/{expense_id}](https://developer.brex.com/openapi/expenses_api/card-expenses/updateexpense.md): Update an expense. Admin and bookkeeper have access to any expense, and regular users can only access their own. ### List card expenses (deprecated) - [GET /v1/expenses/card](https://developer.brex.com/openapi/expenses_api/card-expenses/listexpenses_1.md): This endpoint is deprecated. Use the "List expenses" (GET /v1/expenses) endpoint instead. ### Get a card expense (deprecated) - [GET /v1/expenses/card/{expense_id}](https://developer.brex.com/openapi/expenses_api/card-expenses/getcardexpense.md): This endpoint is deprecated. Use the "Get an expense" (GET /v1/expenses/{id}) endpoint instead. ## Receipt Match Upload receipt and match automatically. ### Create a new receipt match - [POST /v1/expenses/card/receipt_match](https://developer.brex.com/openapi/expenses_api/receipt-match/receiptmatch.md): The uri will be a pre-signed S3 URL allowing you to upload the receipt securely. This URL can only be used for a PUT operation and expires 30 minutes after its creation. Once your upload is complete, we will try to match the receipt with existing expenses. Refer to these docs on how to upload to this pre-signed S3 URL. We highly recommend using one of AWS SDKs if they're available for your language to upload these files. ## Expenses ### List expenses - [GET /v1/expenses](https://developer.brex.com/openapi/expenses_api/expenses/listexpenses.md): List expenses under the same account. Admin and bookkeeper have access to any expense, and regular users can only access their own. ### Get an expense - [GET /v1/expenses/{id}](https://developer.brex.com/openapi/expenses_api/expenses/getexpense.md): Get an expense by its ID. ## Receipt Upload ### Create a new receipt upload - [POST /v1/expenses/card/{expense_id}/receipt_upload](https://developer.brex.com/openapi/expenses_api/receipt-upload/receiptupload.md): The uri will be a pre-signed S3 URL allowing you to upload the receipt securely. This URL can only be used for a PUT operation and expires 30 minutes after its creation. Once your upload is complete, we will try to match the receipt with existing expenses. Refer to these docs on how to upload to this pre-signed S3 URL. We highly recommend using one of AWS SDKs if they're available for your language to upload these files.