Brex
Manage your corporate cards and expenses with Brex.
Authentication
This connector uses Token-based authentication.
info
Set up your connection in the Abstra Console before using it in your workflows.
How to use
Using the Smart Chat
Execute the action "CHOOSE_ONE_ACTION_BELOW" from my connector "YOUR_CONNECTOR_NAME" using the params "PARAMS_HERE".
Using the Web Editor
from abstra.connectors import run_connection_action
result = run_connection_action(
connection_name="your_connection_name",
action_name="your_action_name",
params={
"param1": "value1",
"param2": "value2"
})
Available Actions
This connector provides 97 actions:
| Action | Purpose | Parameters |
|---|---|---|
| budgets/get_v1_budget_programs | Lists Budget Programs belonging to this account | cursor (string) limit (integer) |
| budgets/post_v1_budget_programs | Creates a Budget Program | Idempotency-Key (string) required data: { . existing_budget_ids (array) . budget_blueprints (array) . employee_filter . name (string) . description (string) } (object) required |
| budgets/get_v1_budget_programs_by_id | Retrieves a Budget Program by ID | id (string) |
| budgets/put_v1_budget_programs_by_id | Updates a Budget Program | id (string) Idempotency-Key (string) required data: { . existing_budget_ids (array) . budget_blueprints (array) . employee_filter . name (string) . description (string) } (object) required |
| budgets/delete_v1_budget_programs_by_id | Delete a Budget Program by ID | id (string) |
| budgets/get_v1_budgets | Lists Spend Limits belonging to this account | cursor (string) limit (integer) |
| budgets/post_v1_budgets | Creates a Spend Limit | Idempotency-Key (string) required data: { . name (string) . description (string) . parent_budget_id (string) . owner_user_ids (array) . member_user_ids (array) . period_type . limit . limit_type . spend_type . start_date (string) . end_date (string) . limit_visibility . policy_id (string) . entity_id (string) } (object) required |
| budgets/get_v1_budgets_by_id | Retrieves a Spend Limit by ID | id (string) |
| budgets/put_v1_budgets_by_id | Updates a Spend Limit | id (string) Idempotency-Key (string) required data: { . name (string) . description (string) . owner_user_ids (array) . member_user_ids (array) . limit . limit_type . spend_type . start_date (string) . end_date (string) . limit_visibility . period_type } (object) required |
| budgets/post_v1_budgets_by_id_archive | Archives a Spend Limit, making it unusable for future expenses and removing it from the UI | id (string) |
| budgets/get_v2_budgets | Retrieves a list of Budgets | cursor (string) limit (integer) |
| budgets/post_v2_budgets | Creates a Budget | Idempotency-Key (string) required data: { . name (string) . description (string) . parent_budget_id (string) . owner_user_ids (array) . period_recurrence_type . amount . limit_type . start_date (string) . end_date (string) } (object) required |
| budgets/get_v2_budgets_by_id | Retrieves a Budget by ID | id (string) |
| budgets/put_v2_budgets_by_id | Updates a Budget | id (string) Idempotency-Key (string) required data: { . name (string) . description (string) . parent_budget_id (string) . owner_user_ids (array) . period_recurrence_type . amount . limit_type . start_date (string) . end_date (string) } (object) required |
| budgets/post_v2_budgets_by_id_archive | Archives a Budget, making any Spend Limits beneath it unusable for future expenses and removing it from the UI | id (string) |
| budgets/get_v2_spend_limits | Retrieves a list of Spend Limits | cursor (string) limit (integer) member_user_id (array) |
| budgets/post_v2_spend_limits | Creates a Spend Limit | Idempotency-Key (string) required data: { . name (string) . description (string) . parent_budget_id (string) . period_recurrence_type . start_date (string) . end_date (string) . authorization_settings . expense_visibility . authorization_visibility . transaction_limit . limit_increase_setting . spend_type . auto_transfer_cards_setting . auto_create_limit_cards_setting . owner_user_ids (array) . member_user_ids (array) . expense_policy_id (string) . limit_increase_request_policy_id (string) . limit_approval_policy_id (string) . legal_entity_id (string) . department_id (string) } (object) required |
| budgets/get_v2_spend_limits_by_id | Retrieves a Spend Limit by ID | id (string) |
| budgets/put_v2_spend_limits_by_id | Updates a Spend Limit | id (string) Idempotency-Key (string) required data: { . name (string) . description (string) . status . period_recurrence_type . start_date (string) . end_date (string) . authorization_settings . expense_visibility . authorization_visibility . merchant_category_controls . transaction_limit . limit_increase_setting . spend_type . auto_transfer_cards_setting . auto_create_limit_cards_setting . owner_user_ids (array) . member_user_ids (array) . expense_policy_id (string) . limit_increase_request_policy_id (string) . limit_approval_policy_id (string) . legal_entity_id (string) . department_id (string) } (object) required |
| budgets/post_v2_spend_limits_by_id_archive | Archives a Spend Limit, making it unusable for future expenses and removing it from the UI | id (string) |
| expenses/get_v1_expenses | List expenses under the same account. Admin and bookkeeper have access to any expense, and regular users can only access their own. | expand (array) user_id (array) parent_expense_id (array) budget_id (array) spending_entity_id (array) expense_type (array) status (array) payment_status (array) purchased_at_start (string) purchased_at_end (string) updated_at_start (string) updated_at_end (string) payment_posted_at_start (string) payment_posted_at_end (string) load_custom_fields (boolean) cursor (string) limit (integer) |
| expenses/get_v1_expenses_card | This endpoint is deprecated. Use the 'List expenses' GET /v1/expenses endpoint instead. | expand (array) user_id (array) parent_expense_id (array) budget_id (array) spending_entity_id (array) status (array) payment_status (array) purchased_at_start (string) purchased_at_end (string) updated_at_start (string) updated_at_end (string) payment_posted_at_start (string) payment_posted_at_end (string) load_custom_fields (boolean) cursor (string) limit (integer) |
| expenses/post_v1_expenses_card_receipt_match | 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 docshttps://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html 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 fil | data: { . receipt_name (string) } (object) required |
| expenses/get_v1_expenses_card_by_expense_id | This endpoint is deprecated. Use the 'Get an expense' GET /v1/expenses/id endpoint instead. | expense_id (string) expand (array) load_custom_fields (boolean) |
| expenses/put_v1_expenses_card_by_expense_id | Update an expense. Admin and bookkeeper have access to any expense, and regular users can only access their own. | expense_id (string) data: { . memo (string) } (object) required |
| expenses/post_v1_expenses_card_by_expense_id_receipt_upload | 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 docshttps://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html 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 fil | expense_id (string) data: { . receipt_name (string) } (object) required |
| expenses/get_v1_expenses_by_id | Get an expense by its ID. | id (string) expand (array) load_custom_fields (boolean) |
| fields/get_v1_fields | List custom fields under the same account | field_id (array) cursor (string) limit (integer) |
| fields/post_v1_fields | Create a custom field | Idempotency-Key (string) required data: { . name (string) . group . remote_id (string) . is_disabled (boolean) } (object) required |
| fields/get_v1_fields_by_field_id_values | List values under the same custom field | field_id (string) brex_id (array) value_id (array) remote_id (array) cursor (string) limit (integer) value (string) |
| fields/put_v1_fields_by_field_id_values | Update custom field values up to 1000 values at once for a specific field | field_id (string) data: { . items (array) } (object) required |
| fields/post_v1_fields_by_field_id_values | Create custom field values up to 1000 values at once for a specific field | field_id (string) Idempotency-Key (string) required data: { . items (array) } (object) required |
| fields/delete_v1_fields_by_field_id_values | Delete custom field values up to 1000 values at once for a specific field | field_id (string) data: { . items (array) } (object) required |
| fields/get_v1_fields_by_field_id_values_by_brex_id | Get a field value by field ID and field value ID | field_id (string) brex_id (string) |
| fields/get_v1_fields_by_id | Get a custom field by Brex ID | id (string) |
| fields/put_v1_fields_by_id | Update a field by ID | id (string) data: { . name (string) . is_disabled (boolean) } (object) required |
| fields/delete_v1_fields_by_id | Delete a custom field by Brex ID | id (string) |
| onboarding/get_v1_referrals | Returns referrals created. Note: This doesn't include referrals that have expired. | cursor (string) |
| onboarding/post_v1_referrals | This creates new referrals. The response will contain an identifier and a unique personalized link to an application flow. Many fields are optional and when they're provided they'll prefill the application flow for Brex. You should handle and store these references securely as they contain sensitive information about the referral. | data: { . referral_code (string) . applicant . business . contact_preference } (object) required |
| onboarding/get_v1_referrals_by_id | Returns a referral object by ID if it exists. | id (string) |
| onboarding/post_v1_referrals_by_id_document_upload | The uri will be a presigned S3 URL allowing you to upload the referral doc 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 use this to prefill the application. Refer to these docshttps://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html on how to upload to this presigned S3 URL. We highly recommend using one of AWS SDKs if they're available for your language to upload these files. | id (string) data: { . type } (object) required |
| payments/post_v1_incoming_transfers | This endpoint creates a new incoming transfer. You may use use any eligible bank account connection to fund ACH Debit any active Brex business account. Reminder: You may not use the Brex API for any activity that requires a license or registration from any governmental authority without Brex's prior review and approval. This includes but is not limited to any money services business or money transmission activity. Please review the a href='https://www.brex.com/legal/developer-portal/'Brex A | Idempotency-Key (string) required data: { . counterparty . receiving_account . amount . description (string) } (object) required |
| payments/get_v1_linked_accounts | This endpoint lists all bank connections that are eligible to make ACH transfers to Brex business account | cursor (string) limit (integer) |
| payments/get_v1_transfers | This endpoint lists existing transfers for an account. Currently, the API can only return transfers for the following payment rails: - ACH - DOMESTIC_WIRE - CHEQUE - INTERNATIONAL_WIRE | cursor (string) limit (integer) |
| payments/post_v1_transfers | This endpoint creates a new transfer. Currently, the API can only create transfers for the following payment rails: - ACH - DOMESTIC_WIRE - CHEQUE - INTERNATIONAL_WIRES Transaction Descriptions For outgoing check payments, a successful transfer will return a response containing a description value with a format of Check check number to recipient_name - external_memo. For book transfers from one Brex Business account to another, the recipient value will have a format of customer_account.dba | Idempotency-Key (string) required data: { . counterparty . amount . description (string) . external_memo (string) . originating_account . approval_type . is_ppro_enabled (boolean) } (object) required |
| payments/get_v1_transfers_by_id | This endpoint gets a transfer by ID. Currently, the API can only return transfers for the following payment rails: - ACH - DOMESTIC_WIRE - CHEQUE - INTERNATIONAL_WIRE | id (string) |
| payments/get_v1_vendors | This endpoint lists all existing vendors for an account. Takes an optional parameter to match by vendor name. | cursor (string) limit (integer) name (string) |
| payments/post_v1_vendors | This endpoint creates a new vendor. | Idempotency-Key (string) required data: { . company_name (string) . email (string) . phone (string) . payment_accounts (array) } (object) required |
| payments/get_v1_vendors_by_id | This endpoint gets a vendor by ID. | id (string) |
| payments/put_v1_vendors_by_id | Updates an existing vendor by ID. | id (string) Idempotency-Key (string) data: { . company_name (string) . email (string) . phone (string) . payment_accounts (array) . beneficiary_name (string) } (object) required |
| payments/delete_v1_vendors_by_id | This endpoint deletes a vendor by ID. | id (string) |
| team/get_v2_cards | Lists all cards by a user_id. Only cards with limit_type = CARD have spend_controls | user_id (string) cursor (string) limit (integer) |
| team/post_v2_cards | Creates a new card. The spend_controls field is required when limit_type = CARD. The mailing_address field is required for physical cards and is the shipping address used to send the card; it is not the same as the billing and mailing address used for online purchases. The first 2 lines of this address must be under 60 characters long. Each user can only have up to 10 active physical cards. For Empower accounts, this endpoint requires budget management. If your account does not have access to b | Idempotency-Key (string) required data: { . owner . card_name (string) . card_type . limit_type . spend_controls . mailing_address . metadata (object) . card_attribute_preferences } (object) required |
| team/get_v2_cards_by_id | Retrieves a card by ID. Only cards with limit_type = CARD have spend_controls | id (string) |
| team/put_v2_cards_by_id | Update an existing vendor card | id (string) Idempotency-Key (string) data: { . spend_controls . metadata (object) } (object) required |
| team/post_v2_cards_by_id_lock | Locks an existing, unlocked card. And the card owner will receive a notification about it. | id (string) Idempotency-Key (string) data: { . description (string) . reason } (object) required |
| team/get_v2_cards_by_id_pan | Retrieves card number, CVV, and expiration date of a card by ID. | id (string) |
| team/post_v2_cards_by_id_secure_email | Creates a secure email to send card number, CVV, and expiration date of a card by ID to the specified email. This endpoint is currently gated. If you would like to request access, please reach out to developer-support@brex.com | id (string) Idempotency-Key (string) required data: { . recipient_email (string) . sender_name (string) . message (string) . expiry_days (integer) } (object) required |
| team/post_v2_cards_by_id_terminate | Terminates an existing card. The card owner will receive a notification about it. | id (string) Idempotency-Key (string) data: { . description (string) . reason } (object) required |
| team/post_v2_cards_by_id_unlock | Unlocks an existing card. | id (string) Idempotency-Key (string) |
| team/get_v2_company | This endpoint returns the company associated with the OAuth2 access token. | No parameters |
| team/get_v2_departments | This endpoint lists all departments. | cursor (string) limit (integer) name (string) |
| team/post_v2_departments | This endpoint creates a new department | Idempotency-Key (string) data: { . name (string) . description (string) } (object) required |
| team/get_v2_departments_by_id | This endpoint gets a department by ID. | id (string) |
| team/get_v2_legal_entities | List legal entities for the account. | cursor (string) limit (integer) |
| team/get_v2_legal_entities_by_id | Get a legal entity by its ID. | id (string) |
| team/get_v2_locations | This endpoint lists all locations. | cursor (string) limit (integer) name (string) |
| team/post_v2_locations | This endpoint creates a new location. | Idempotency-Key (string) data: { . name (string) . description (string) } (object) required |
| team/get_v2_locations_by_id | This endpoint gets a location by ID. | id (string) |
| team/get_v2_titles | This endpoint lists all titles. | cursor (string) limit (integer) name (string) |
| team/post_v2_titles | This endpoint creates a new title | Idempotency-Key (string) data: { . name (string) } (object) required |
| team/get_v2_titles_by_id | This endpoint gets a title by ID. | id (string) |
| team/get_v2_users | This endpoint lists all users. To find a user id by email, you can filter using the email query parameter. | cursor (string) limit (integer) email (string) remote_display_id (string) expand (array) |
| team/post_v2_users | This endpoint invites a new user as an employee. To update user's role, check out this articlehttps://support.brex.com/how-do-i-change-another-user-s-role/. | Idempotency-Key (string) data: { . first_name (string) . last_name (string) . email (string) . manager_id (string) . department_id (string) . location_id (string) . title_id (string) . metadata (object) } (object) required |
| team/get_v2_users_me | This endpoint returns the user associated with the OAuth2 access token. | No parameters |
| team/get_v2_users_by_id | This endpoint gets a user by ID. | id (string) |
| team/put_v2_users_by_id | This endpoint updates a user. Any parameters not provided will be left unchanged. | id (string) Idempotency-Key (string) data: { . status . manager_id (string) . department_id (string) . location_id (string) . title_id (string) . metadata (object) } (object) required |
| team/get_v2_users_by_id_limit | This endpoint gets the monthly limit for the user including the monthly available limit. | id (string) |
| team/post_v2_users_by_id_limit | This endpoint sets the monthly limit for a user. The limit amount must be non-negative. To unset the monthly limit of the user, just set monthly_limit to null. | id (string) Idempotency-Key (string) data: { . monthly_limit } (object) required |
| transactions/get_v2_accounts_card | This endpoint lists all accounts of card type. | No parameters |
| transactions/get_v2_accounts_card_primary_statements | This endpoint lists all finalized statements for the primary card account. | cursor (string) limit (integer) |
| transactions/get_v2_accounts_cash | This endpoint lists all the existing cash accounts with their status. | No parameters |
| transactions/get_v2_accounts_cash_primary | This endpoint returns the primary cash account with its status. There will always be only one primary account. | No parameters |
| transactions/get_v2_accounts_cash_by_id | This endpoint returns the cash account associated with the provided ID with its status. | id (string) |
| transactions/get_v2_accounts_cash_by_id_statements | This endpoint lists all finalized statements for the cash account by ID. | id (string) cursor (string) limit (integer) |
| transactions/get_v2_transactions_card_primary | This endpoint lists all settled transactions for all card accounts. Regular users may only fetch their own 'PURCHASE','REFUND' and 'CHARGEBACK' settled transactions. | cursor (string) limit (integer) user_ids (array) posted_at_start (string) expand (array) |
| transactions/get_v2_transactions_cash_by_id | This endpoint lists all transactions for the cash account with the selected ID. | id (string) cursor (string) limit (integer) posted_at_start (string) |
| travel/get_v1_trips | Lists trips according to the filters passed in the query string. | cursor (string) limit (integer) last_updated_after (string) |
| travel/get_v1_trips_by_trip_id | Retrieves a trip by ID. | trip_id (string) |
| travel/get_v1_trips_by_trip_id_bookings | Lists the bookings within a trip. | trip_id (string) cursor (string) limit (integer) |
| travel/get_v1_trips_by_trip_id_bookings_by_booking_id | Retrieves a booking by trip and booking ID. | trip_id (string) booking_id (string) |
| webhooks/get_v1_webhooks | List the webhooks you have registered | cursor (string) limit (integer) |
| webhooks/post_v1_webhooks | Register an endpoint to start receiving selected webhook events | Idempotency-Key (string) required data: { . url (string) . event_types (array) } (object) required |
| webhooks/get_v1_webhooks_secrets | 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. | No parameters |
| webhooks/get_v1_webhooks_by_id | Get details of a webhook | id (string) |
| webhooks/put_v1_webhooks_by_id | Update a webhook. You can update the endpoint url, event types that the endpoint receives, or temporarily deactivate the webhook. | id (string) data: { . url (string) . event_types (array) . status } (object) required |
| webhooks/delete_v1_webhooks_by_id | Unregister a webhook if you want to stop receiving webhook events | id (string) |