Skip to main content

Brex

Manage your corporate cards and expenses with Brex.

Brex Logo

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:

ActionPurposeParameters
budgets/get_v1_budget_programsLists Budget Programs belonging to this accountcursor (string)
limit (integer)
budgets/post_v1_budget_programsCreates a Budget ProgramIdempotency-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_idRetrieves a Budget Program by IDid (string)
budgets/put_v1_budget_programs_by_idUpdates a Budget Programid (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_idDelete a Budget Program by IDid (string)
budgets/get_v1_budgetsLists Spend Limits belonging to this accountcursor (string)
limit (integer)
budgets/post_v1_budgetsCreates a Spend LimitIdempotency-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_idRetrieves a Spend Limit by IDid (string)
budgets/put_v1_budgets_by_idUpdates a Spend Limitid (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_archiveArchives a Spend Limit, making it unusable for future expenses and removing it from the UIid (string)
budgets/get_v2_budgetsRetrieves a list of Budgetscursor (string)
limit (integer)
budgets/post_v2_budgetsCreates a BudgetIdempotency-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_idRetrieves a Budget by IDid (string)
budgets/put_v2_budgets_by_idUpdates a Budgetid (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_archiveArchives a Budget, making any Spend Limits beneath it unusable for future expenses and removing it from the UIid (string)
budgets/get_v2_spend_limitsRetrieves a list of Spend Limitscursor (string)
limit (integer)
member_user_id (array)
budgets/post_v2_spend_limitsCreates a Spend LimitIdempotency-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_idRetrieves a Spend Limit by IDid (string)
budgets/put_v2_spend_limits_by_idUpdates a Spend Limitid (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_archiveArchives a Spend Limit, making it unusable for future expenses and removing it from the UIid (string)
expenses/get_v1_expensesList 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_cardThis 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_matchThe 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 fildata: {
. receipt_name (string)
} (object) required
expenses/get_v1_expenses_card_by_expense_idThis 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_idUpdate 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_uploadThe 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 filexpense_id (string)
data: {
. receipt_name (string)
} (object) required
expenses/get_v1_expenses_by_idGet an expense by its ID.id (string)
expand (array)
load_custom_fields (boolean)
fields/get_v1_fieldsList custom fields under the same accountfield_id (array)
cursor (string)
limit (integer)
fields/post_v1_fieldsCreate a custom fieldIdempotency-Key (string) required
data: {
. name (string)
. group
. remote_id (string)
. is_disabled (boolean)
} (object) required
fields/get_v1_fields_by_field_id_valuesList values under the same custom fieldfield_id (string)
brex_id (array)
value_id (array)
remote_id (array)
cursor (string)
limit (integer)
value (string)
fields/put_v1_fields_by_field_id_valuesUpdate custom field values up to 1000 values at once for a specific fieldfield_id (string)
data: {
. items (array)
} (object) required
fields/post_v1_fields_by_field_id_valuesCreate custom field values up to 1000 values at once for a specific fieldfield_id (string)
Idempotency-Key (string) required
data: {
. items (array)
} (object) required
fields/delete_v1_fields_by_field_id_valuesDelete custom field values up to 1000 values at once for a specific fieldfield_id (string)
data: {
. items (array)
} (object) required
fields/get_v1_fields_by_field_id_values_by_brex_idGet a field value by field ID and field value IDfield_id (string)
brex_id (string)
fields/get_v1_fields_by_idGet a custom field by Brex IDid (string)
fields/put_v1_fields_by_idUpdate a field by IDid (string)
data: {
. name (string)
. is_disabled (boolean)
} (object) required
fields/delete_v1_fields_by_idDelete a custom field by Brex IDid (string)
onboarding/get_v1_referralsReturns referrals created. Note: This doesn't include referrals that have expired.cursor (string)
onboarding/post_v1_referralsThis 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_idReturns a referral object by ID if it exists.id (string)
onboarding/post_v1_referrals_by_id_document_uploadThe 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_transfersThis 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 AIdempotency-Key (string) required
data: {
. counterparty
. receiving_account
. amount
. description (string)
} (object) required
payments/get_v1_linked_accountsThis endpoint lists all bank connections that are eligible to make ACH transfers to Brex business accountcursor (string)
limit (integer)
payments/get_v1_transfersThis endpoint lists existing transfers for an account. Currently, the API can only return transfers for the following payment rails: - ACH - DOMESTIC_WIRE - CHEQUE - INTERNATIONAL_WIREcursor (string)
limit (integer)
payments/post_v1_transfersThis 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.dbaIdempotency-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_idThis endpoint gets a transfer by ID. Currently, the API can only return transfers for the following payment rails: - ACH - DOMESTIC_WIRE - CHEQUE - INTERNATIONAL_WIREid (string)
payments/get_v1_vendorsThis 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_vendorsThis 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_idThis endpoint gets a vendor by ID.id (string)
payments/put_v1_vendors_by_idUpdates 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_idThis endpoint deletes a vendor by ID.id (string)
team/get_v2_cardsLists all cards by a user_id. Only cards with limit_type = CARD have spend_controlsuser_id (string)
cursor (string)
limit (integer)
team/post_v2_cardsCreates 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 bIdempotency-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_idRetrieves a card by ID. Only cards with limit_type = CARD have spend_controlsid (string)
team/put_v2_cards_by_idUpdate an existing vendor cardid (string)
Idempotency-Key (string)
data: {
. spend_controls
. metadata (object)
} (object) required
team/post_v2_cards_by_id_lockLocks 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_panRetrieves card number, CVV, and expiration date of a card by ID.id (string)
team/post_v2_cards_by_id_secure_emailCreates 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.comid (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_terminateTerminates 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_unlockUnlocks an existing card.id (string)
Idempotency-Key (string)
team/get_v2_companyThis endpoint returns the company associated with the OAuth2 access token.No parameters
team/get_v2_departmentsThis endpoint lists all departments.cursor (string)
limit (integer)
name (string)
team/post_v2_departmentsThis endpoint creates a new departmentIdempotency-Key (string)
data: {
. name (string)
. description (string)
} (object) required
team/get_v2_departments_by_idThis endpoint gets a department by ID.id (string)
team/get_v2_legal_entitiesList legal entities for the account.cursor (string)
limit (integer)
team/get_v2_legal_entities_by_idGet a legal entity by its ID.id (string)
team/get_v2_locationsThis endpoint lists all locations.cursor (string)
limit (integer)
name (string)
team/post_v2_locationsThis endpoint creates a new location.Idempotency-Key (string)
data: {
. name (string)
. description (string)
} (object) required
team/get_v2_locations_by_idThis endpoint gets a location by ID.id (string)
team/get_v2_titlesThis endpoint lists all titles.cursor (string)
limit (integer)
name (string)
team/post_v2_titlesThis endpoint creates a new titleIdempotency-Key (string)
data: {
. name (string)
} (object) required
team/get_v2_titles_by_idThis endpoint gets a title by ID.id (string)
team/get_v2_usersThis 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_usersThis 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_meThis endpoint returns the user associated with the OAuth2 access token.No parameters
team/get_v2_users_by_idThis endpoint gets a user by ID.id (string)
team/put_v2_users_by_idThis 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_limitThis endpoint gets the monthly limit for the user including the monthly available limit.id (string)
team/post_v2_users_by_id_limitThis 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_cardThis endpoint lists all accounts of card type.No parameters
transactions/get_v2_accounts_card_primary_statementsThis endpoint lists all finalized statements for the primary card account.cursor (string)
limit (integer)
transactions/get_v2_accounts_cashThis endpoint lists all the existing cash accounts with their status.No parameters
transactions/get_v2_accounts_cash_primaryThis 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_idThis endpoint returns the cash account associated with the provided ID with its status.id (string)
transactions/get_v2_accounts_cash_by_id_statementsThis endpoint lists all finalized statements for the cash account by ID.id (string)
cursor (string)
limit (integer)
transactions/get_v2_transactions_card_primaryThis 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_idThis 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_tripsLists trips according to the filters passed in the query string.cursor (string)
limit (integer)
last_updated_after (string)
travel/get_v1_trips_by_trip_idRetrieves a trip by ID.trip_id (string)
travel/get_v1_trips_by_trip_id_bookingsLists the bookings within a trip.trip_id (string)
cursor (string)
limit (integer)
travel/get_v1_trips_by_trip_id_bookings_by_booking_idRetrieves a booking by trip and booking ID.trip_id (string)
booking_id (string)
webhooks/get_v1_webhooksList the webhooks you have registeredcursor (string)
limit (integer)
webhooks/post_v1_webhooksRegister an endpoint to start receiving selected webhook eventsIdempotency-Key (string) required
data: {
. url (string)
. event_types (array)
} (object) required
webhooks/get_v1_webhooks_secretsThis 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_idGet details of a webhookid (string)
webhooks/put_v1_webhooks_by_idUpdate 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_idUnregister a webhook if you want to stop receiving webhook eventsid (string)