KosmoKrator

data

Brex Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Brex KosmoKrator integration.

Lua Namespace

Agents call this integration through app.integrations.brex.*. Use lua_read_doc("integrations.brex") inside KosmoKrator to discover the same reference at runtime.

Call Lua from the Headless CLI

Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic Brex workflow without starting an interactive agent session.

Inline Lua call
kosmo integrations:lua --eval 'dump(app.integrations.brex.create_accounting_integration({}))' --json
Read Lua docs headlessly
kosmo integrations:lua --eval 'print(docs.read("brex"))' --json
kosmo integrations:lua --eval 'print(docs.read("brex.create_accounting_integration"))' --json

Workflow file

Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.

workflow.lua
local brex = app.integrations.brex
local result = brex.create_accounting_integration({})

dump(result)
Run the workflow
kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json
Namespace note. integrations:lua exposes app.integrations.brex, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.brex.default.* or app.integrations.brex.work.* when you configured named credential accounts.

MCP-only Lua

If the script only needs configured MCP servers and does not need Brex, use the narrower mcp:lua command.

MCP Lua command
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Brex Lua Docs

Brex tools are exposed under app.integrations.brex. This package combines 10 official Brex OpenAPI descriptions and exposes all 108 operations found in those specs.

Configure access_token and optionally url. The default URL is https://api.brex.com.

Pass path, query, and header parameters as top-level snake_case arguments. Pass JSON request bodies under body. Header parameters such as Idempotency-Key are exposed as idempotency_key.

local cards = app.integrations.brex.brex_team_list_cards_by_user_id({ user_id = "user_123", limit = 20 })
local created = app.integrations.brex.brex_team_create_card({ idempotency_key = "example-key", body = { user_id = "user_123" } })

Coverage Notes

The manifest brex-openapi-manifest.json records source URLs, API groups, operation IDs, methods, paths, tool slugs, and classes.

Representative Tools

  • brex_accounting_create_integration - POST /v3/accounting/integration
  • brex_accounting_disconnect_integration - POST /v3/accounting/integration/{integration_id}/disconnect
  • brex_accounting_reactivate_integration - POST /v3/accounting/integration/{integration_id}/reactivate
  • brex_accounting_get_accounting_record - GET /v3/accounting/records/{record_id}
  • brex_accounting_query_accounting_records - GET /v3/accounting/records
  • brex_accounting_report_accounting_export_results - POST /v3/accounting/records/export-results
  • brex_budgets_list_budget_programs - GET /v1/budget_programs
  • brex_budgets_get_budget_program_by_id - GET /v1/budget_programs/{id}
  • brex_budgets_list_budgets - GET /v1/budgets
  • brex_budgets_create_budget - POST /v1/budgets
  • brex_budgets_get_budget_by_id - GET /v1/budgets/{id}
  • brex_budgets_update_budget - PUT /v1/budgets/{id}
  • brex_budgets_archive_budget - POST /v1/budgets/{id}/archive
  • brex_budgets_list_spend_budgets - GET /v2/budgets
  • brex_budgets_create_spend_budget - POST /v2/budgets
  • brex_budgets_get_spend_budget_by_id - GET /v2/budgets/{id}
  • brex_budgets_update_spend_budget - PUT /v2/budgets/{id}
  • brex_budgets_archive_spend_budget - POST /v2/budgets/{id}/archive
Raw agent markdown
# Brex Lua Docs

Brex tools are exposed under `app.integrations.brex`. This package combines 10 official Brex OpenAPI descriptions and exposes all 108 operations found in those specs.

Configure `access_token` and optionally `url`. The default URL is `https://api.brex.com`.

Pass path, query, and header parameters as top-level snake_case arguments. Pass JSON request bodies under `body`. Header parameters such as `Idempotency-Key` are exposed as `idempotency_key`.

```lua
local cards = app.integrations.brex.brex_team_list_cards_by_user_id({ user_id = "user_123", limit = 20 })
local created = app.integrations.brex.brex_team_create_card({ idempotency_key = "example-key", body = { user_id = "user_123" } })
```

## Coverage Notes

The manifest `brex-openapi-manifest.json` records source URLs, API groups, operation IDs, methods, paths, tool slugs, and classes.

## Representative Tools

- `brex_accounting_create_integration` - POST `/v3/accounting/integration`
- `brex_accounting_disconnect_integration` - POST `/v3/accounting/integration/{integration_id}/disconnect`
- `brex_accounting_reactivate_integration` - POST `/v3/accounting/integration/{integration_id}/reactivate`
- `brex_accounting_get_accounting_record` - GET `/v3/accounting/records/{record_id}`
- `brex_accounting_query_accounting_records` - GET `/v3/accounting/records`
- `brex_accounting_report_accounting_export_results` - POST `/v3/accounting/records/export-results`
- `brex_budgets_list_budget_programs` - GET `/v1/budget_programs`
- `brex_budgets_get_budget_program_by_id` - GET `/v1/budget_programs/{id}`
- `brex_budgets_list_budgets` - GET `/v1/budgets`
- `brex_budgets_create_budget` - POST `/v1/budgets`
- `brex_budgets_get_budget_by_id` - GET `/v1/budgets/{id}`
- `brex_budgets_update_budget` - PUT `/v1/budgets/{id}`
- `brex_budgets_archive_budget` - POST `/v1/budgets/{id}/archive`
- `brex_budgets_list_spend_budgets` - GET `/v2/budgets`
- `brex_budgets_create_spend_budget` - POST `/v2/budgets`
- `brex_budgets_get_spend_budget_by_id` - GET `/v2/budgets/{id}`
- `brex_budgets_update_spend_budget` - PUT `/v2/budgets/{id}`
- `brex_budgets_archive_spend_budget` - POST `/v2/budgets/{id}/archive`
Metadata-derived Lua example
local result = app.integrations.brex.create_accounting_integration({})
print(result)

Functions

create_accounting_integration Write

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 ...

Lua path
app.integrations.brex.create_accounting_integration
Full name
brex.brex_accounting_create_integration
ParameterTypeRequiredDescription
No parameters.
disconnect_accounting_integration Write

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...

Lua path
app.integrations.brex.disconnect_accounting_integration
Full name
brex.brex_accounting_disconnect_integration
ParameterTypeRequiredDescription
No parameters.
reactivate_accounting_integration Write

Reactivate a disconnected accounting integration. - If integration is DISABLED: Reactivates and returns success - If integration ID doesn't exist: Returns 404 error - If an acti...

Lua path
app.integrations.brex.reactivate_accounting_integration
Full name
brex.brex_accounting_reactivate_integration
ParameterTypeRequiredDescription
No parameters.
get_accounting_record_by_id Read

Retrieve a single accounting record by its unique identifier

Lua path
app.integrations.brex.get_accounting_record_by_id
Full name
brex.brex_accounting_get_accounting_record
ParameterTypeRequiredDescription
No parameters.
query_accounting_records Read

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. Suggeste...

Lua path
app.integrations.brex.query_accounting_records
Full name
brex.brex_accounting_query_accounting_records
ParameterTypeRequiredDescription
No parameters.
report_accounting_export_results Write

Report export success or failure for accounting records.

Lua path
app.integrations.brex.report_accounting_export_results
Full name
brex.brex_accounting_report_accounting_export_results
ParameterTypeRequiredDescription
No parameters.
list_budget_programs Read

Lists Budget Programs belonging to this account

Lua path
app.integrations.brex.list_budget_programs
Full name
brex.brex_budgets_list_budget_programs
ParameterTypeRequiredDescription
No parameters.
get_budget_program Read

Retrieves a Budget Program by ID

Lua path
app.integrations.brex.get_budget_program
Full name
brex.brex_budgets_get_budget_program_by_id
ParameterTypeRequiredDescription
No parameters.
list_spend_limits Read

Lists Spend Limits belonging to this account

Lua path
app.integrations.brex.list_spend_limits
Full name
brex.brex_budgets_list_budgets
ParameterTypeRequiredDescription
No parameters.
create_spend_limit Write

Creates a Spend Limit

Lua path
app.integrations.brex.create_spend_limit
Full name
brex.brex_budgets_create_budget
ParameterTypeRequiredDescription
No parameters.
get_spend_limit Read

Retrieves a Spend Limit by ID

Lua path
app.integrations.brex.get_spend_limit
Full name
brex.brex_budgets_get_budget_by_id
ParameterTypeRequiredDescription
No parameters.
update_spend_limit Write

Updates a Spend Limit

Lua path
app.integrations.brex.update_spend_limit
Full name
brex.brex_budgets_update_budget
ParameterTypeRequiredDescription
No parameters.
archive_spend_limit Write

Archives a Spend Limit, making it unusable for future expenses and removing it from the UI

Lua path
app.integrations.brex.archive_spend_limit
Full name
brex.brex_budgets_archive_budget
ParameterTypeRequiredDescription
No parameters.
list_budgets Read

Retrieves a list of Budgets

Lua path
app.integrations.brex.list_budgets
Full name
brex.brex_budgets_list_spend_budgets
ParameterTypeRequiredDescription
No parameters.
create_budget Write

Creates a Budget

Lua path
app.integrations.brex.create_budget
Full name
brex.brex_budgets_create_spend_budget
ParameterTypeRequiredDescription
No parameters.
get_budget Read

Retrieves a Budget by ID

Lua path
app.integrations.brex.get_budget
Full name
brex.brex_budgets_get_spend_budget_by_id
ParameterTypeRequiredDescription
No parameters.
update_budget Write

Updates a Budget

Lua path
app.integrations.brex.update_budget
Full name
brex.brex_budgets_update_spend_budget
ParameterTypeRequiredDescription
No parameters.
archive_budget Write

Archives a Budget, making any Spend Limits beneath it unusable for future expenses and removing it from the UI

Lua path
app.integrations.brex.archive_budget
Full name
brex.brex_budgets_archive_spend_budget
ParameterTypeRequiredDescription
No parameters.
list_spend_limits Read

Retrieves a list of Spend Limits

Lua path
app.integrations.brex.list_spend_limits
Full name
brex.brex_budgets_list_spend_limits
ParameterTypeRequiredDescription
No parameters.
create_spend_limit Write

Creates a Spend Limit

Lua path
app.integrations.brex.create_spend_limit
Full name
brex.brex_budgets_create_spend_limit
ParameterTypeRequiredDescription
No parameters.
get_spend_limit Read

Retrieves a Spend Limit by ID

Lua path
app.integrations.brex.get_spend_limit
Full name
brex.brex_budgets_get_spend_limit_by_id
ParameterTypeRequiredDescription
No parameters.
update_spend_limit Write

Updates a Spend Limit

Lua path
app.integrations.brex.update_spend_limit
Full name
brex.brex_budgets_update_spend_limit
ParameterTypeRequiredDescription
No parameters.
archive_spend_limit Write

Archives a Spend Limit, making it unusable for future expenses and removing it from the UI

Lua path
app.integrations.brex.archive_spend_limit
Full name
brex.brex_budgets_archive_spend_limit
ParameterTypeRequiredDescription
No parameters.
list_expenses Read

List expenses under the same account. Admin and bookkeeper have access to any expense, and regular users can only access their own.

Lua path
app.integrations.brex.list_expenses
Full name
brex.brex_expenses_list_expenses
ParameterTypeRequiredDescription
No parameters.
list_card_expenses Read

This endpoint is deprecated. Use the "List expenses" (`GET /v1/expenses`) endpoint instead.

Lua path
app.integrations.brex.list_card_expenses
Full name
brex.brex_expenses_list_expenses_1
ParameterTypeRequiredDescription
No parameters.
create_new_receipt_match Write

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. Onc...

Lua path
app.integrations.brex.create_new_receipt_match
Full name
brex.brex_expenses_receipt_match
ParameterTypeRequiredDescription
No parameters.
get_card_expense Read

This endpoint is deprecated. Use the "Get an expense" (`GET /v1/expenses/{id}`) endpoint instead.

Lua path
app.integrations.brex.get_card_expense
Full name
brex.brex_expenses_get_card_expense
ParameterTypeRequiredDescription
No parameters.
update_expense Write

Update an expense. Admin and bookkeeper have access to any expense, and regular users can only access their own.

Lua path
app.integrations.brex.update_expense
Full name
brex.brex_expenses_update_expense
ParameterTypeRequiredDescription
No parameters.
create_new_receipt_upload Write

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. Onc...

Lua path
app.integrations.brex.create_new_receipt_upload
Full name
brex.brex_expenses_receipt_upload
ParameterTypeRequiredDescription
No parameters.
get_expense Read

Get an expense by its ID.

Lua path
app.integrations.brex.get_expense
Full name
brex.brex_expenses_get_expense
ParameterTypeRequiredDescription
No parameters.
list_custom_fields Read

List custom fields under the same account

Lua path
app.integrations.brex.list_custom_fields
Full name
brex.brex_fields_list_fields
ParameterTypeRequiredDescription
No parameters.
create_custom_field Write

Create a custom field

Lua path
app.integrations.brex.create_custom_field
Full name
brex.brex_fields_create_field
ParameterTypeRequiredDescription
No parameters.
list_custom_field_values Read

List values under the same custom field

Lua path
app.integrations.brex.list_custom_field_values
Full name
brex.brex_fields_list_field_values
ParameterTypeRequiredDescription
No parameters.
update_custom_field_values Write

Update custom field values (up to 1000 values at once) for a specific field

Lua path
app.integrations.brex.update_custom_field_values
Full name
brex.brex_fields_update_field_values
ParameterTypeRequiredDescription
No parameters.
create_custom_field_values Write

Create custom field values (up to 1000 values at once) for a specific field

Lua path
app.integrations.brex.create_custom_field_values
Full name
brex.brex_fields_create_field_values
ParameterTypeRequiredDescription
No parameters.
delete_custom_field_values Write

Delete custom field values (up to 1000 values at once) for a specific field

Lua path
app.integrations.brex.delete_custom_field_values
Full name
brex.brex_fields_delete_field_values
ParameterTypeRequiredDescription
No parameters.
get_field_value Read

Get a field value by field ID and field value ID

Lua path
app.integrations.brex.get_field_value
Full name
brex.brex_fields_get_field_value_by_id
ParameterTypeRequiredDescription
No parameters.
get_custom_field Read

Get a custom field by Brex ID

Lua path
app.integrations.brex.get_custom_field
Full name
brex.brex_fields_get_field_by_id
ParameterTypeRequiredDescription
No parameters.
update_custom_field Write

Update a field by ID

Lua path
app.integrations.brex.update_custom_field
Full name
brex.brex_fields_update_field
ParameterTypeRequiredDescription
No parameters.
delete_custom_field Write

Delete a custom field by Brex ID

Lua path
app.integrations.brex.delete_custom_field
Full name
brex.brex_fields_delete_field
ParameterTypeRequiredDescription
No parameters.
list_referrals Read

Returns referrals created. *Note*: This doesn't include referrals that have expired.

Lua path
app.integrations.brex.list_referrals
Full name
brex.brex_onboarding_list_referrals
ParameterTypeRequiredDescription
No parameters.
creates_referral Write

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 the...

Lua path
app.integrations.brex.creates_referral
Full name
brex.brex_onboarding_create_referral_request
ParameterTypeRequiredDescription
No parameters.
gets_referral_by_id Read

Returns a referral object by ID if it exists.

Lua path
app.integrations.brex.gets_referral_by_id
Full name
brex.brex_onboarding_get_referral
ParameterTypeRequiredDescription
No parameters.
create_new_document_upload Write

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....

Lua path
app.integrations.brex.create_new_document_upload
Full name
brex.brex_onboarding_create_document
ParameterTypeRequiredDescription
No parameters.
process_delayed_ein_document_after_upload Write

Processes a delayed EIN document after it has been uploaded. This endpoint should be called after successfully uploading an IRS EIN Confirmation document (CP-575, CP-575 fax she...

Lua path
app.integrations.brex.process_delayed_ein_document_after_upload
Full name
brex.brex_onboarding_process_delayed_eindocument
ParameterTypeRequiredDescription
No parameters.
create_incoming_transfer Write

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 n...

Lua path
app.integrations.brex.create_incoming_transfer
Full name
brex.brex_payments_create_incoming_transfer
ParameterTypeRequiredDescription
No parameters.
lists_linked_accounts Read

This endpoint lists all bank connections that are eligible to make ACH transfers to Brex business account

Lua path
app.integrations.brex.lists_linked_accounts
Full name
brex.brex_payments_list_linked_accounts
ParameterTypeRequiredDescription
No parameters.
lists_transfers Read

This endpoint lists existing transfers for an account. Currently, the API can only return transfers for the following payment rails: - ACH - DOMESTIC_WIRE - CHEQUE - INTERNATION...

Lua path
app.integrations.brex.lists_transfers
Full name
brex.brex_payments_list_transfers
ParameterTypeRequiredDescription
No parameters.
create_transfer Write

This endpoint creates a new transfer. Currently, the API can only create transfers for the following payment rails: - ACH - DOMESTIC_WIRE - CHEQUE - INTERNATIONAL_WIRES **Transa...

Lua path
app.integrations.brex.create_transfer
Full name
brex.brex_payments_create_transfer
ParameterTypeRequiredDescription
No parameters.
get_transfer Read

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

Lua path
app.integrations.brex.get_transfer
Full name
brex.brex_payments_get_transfers_by_id
ParameterTypeRequiredDescription
No parameters.
lists_vendors Read

This endpoint lists all existing vendors for an account. Takes an optional parameter to match by vendor name.

Lua path
app.integrations.brex.lists_vendors
Full name
brex.brex_payments_list_vendors
ParameterTypeRequiredDescription
No parameters.
create_vendor Write

This endpoint creates a new vendor.

Lua path
app.integrations.brex.create_vendor
Full name
brex.brex_payments_create_vendor
ParameterTypeRequiredDescription
No parameters.
get_vendor Read

This endpoint gets a vendor by ID.

Lua path
app.integrations.brex.get_vendor
Full name
brex.brex_payments_get_vendor_by_id
ParameterTypeRequiredDescription
No parameters.
update_vendor Write

Updates an existing vendor by ID.

Lua path
app.integrations.brex.update_vendor
Full name
brex.brex_payments_update_vendor
ParameterTypeRequiredDescription
No parameters.
delete_vendor Write

This endpoint deletes a vendor by ID.

Lua path
app.integrations.brex.delete_vendor
Full name
brex.brex_payments_delete_vendor
ParameterTypeRequiredDescription
No parameters.
list_cards Read

Lists all cards by a `user_id`. Only cards with `limit_type = CARD` have `spend_controls`

Lua path
app.integrations.brex.list_cards
Full name
brex.brex_team_list_cards_by_user_id
ParameterTypeRequiredDescription
No parameters.
create_card Write

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 use...

Lua path
app.integrations.brex.create_card
Full name
brex.brex_team_create_card
ParameterTypeRequiredDescription
No parameters.
get_card Read

Retrieves a card by ID. Only cards with `limit_type = CARD` have `spend_controls`

Lua path
app.integrations.brex.get_card
Full name
brex.brex_team_get_card_by_id
ParameterTypeRequiredDescription
No parameters.
update_card Write

Update an existing vendor card

Lua path
app.integrations.brex.update_card
Full name
brex.brex_team_update_card
ParameterTypeRequiredDescription
No parameters.
lock_card Write

Locks an existing, unlocked card. And the card owner will receive a notification about it.

Lua path
app.integrations.brex.lock_card
Full name
brex.brex_team_lock_card
ParameterTypeRequiredDescription
No parameters.
get_card_number Read

Retrieves card number, CVV, and expiration date of a card by ID.

Lua path
app.integrations.brex.get_card_number
Full name
brex.brex_team_get_card_number
ParameterTypeRequiredDescription
No parameters.
create_secure_email_send_card_number Write

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 acces...

Lua path
app.integrations.brex.create_secure_email_send_card_number
Full name
brex.brex_team_email_card_number
ParameterTypeRequiredDescription
No parameters.
terminate_card Write

Terminates an existing card. The card owner will receive a notification about it.

Lua path
app.integrations.brex.terminate_card
Full name
brex.brex_team_terminate_card
ParameterTypeRequiredDescription
No parameters.
unlock_card Write

Unlocks an existing card.

Lua path
app.integrations.brex.unlock_card
Full name
brex.brex_team_unlock_card
ParameterTypeRequiredDescription
No parameters.
get_company Read

This endpoint returns the company associated with the OAuth2 access token.

Lua path
app.integrations.brex.get_company
Full name
brex.brex_team_get_company
ParameterTypeRequiredDescription
No parameters.
list_departments Read

This endpoint lists all departments.

Lua path
app.integrations.brex.list_departments
Full name
brex.brex_team_list_departments
ParameterTypeRequiredDescription
No parameters.
create_department Write

This endpoint creates a new department

Lua path
app.integrations.brex.create_department
Full name
brex.brex_team_create_department
ParameterTypeRequiredDescription
No parameters.
get_department Read

This endpoint gets a department by ID.

Lua path
app.integrations.brex.get_department
Full name
brex.brex_team_get_department_by_id
ParameterTypeRequiredDescription
No parameters.
list_locations Read

This endpoint lists all locations.

Lua path
app.integrations.brex.list_locations
Full name
brex.brex_team_list_locations
ParameterTypeRequiredDescription
No parameters.
create_location Write

This endpoint creates a new location.

Lua path
app.integrations.brex.create_location
Full name
brex.brex_team_create_location
ParameterTypeRequiredDescription
No parameters.
get_location Read

This endpoint gets a location by ID.

Lua path
app.integrations.brex.get_location
Full name
brex.brex_team_get_location_by_id
ParameterTypeRequiredDescription
No parameters.
list_titles Read

This endpoint lists all titles.

Lua path
app.integrations.brex.list_titles
Full name
brex.brex_team_list_titles
ParameterTypeRequiredDescription
No parameters.
create_title Write

This endpoint creates a new title

Lua path
app.integrations.brex.create_title
Full name
brex.brex_team_create_title
ParameterTypeRequiredDescription
No parameters.
get_title Read

This endpoint gets a title by ID.

Lua path
app.integrations.brex.get_title
Full name
brex.brex_team_get_title_by_id
ParameterTypeRequiredDescription
No parameters.
list_users Read

This endpoint lists all users. To find a user id by email, you can filter using the `email` query parameter.

Lua path
app.integrations.brex.list_users
Full name
brex.brex_team_list_users
ParameterTypeRequiredDescription
No parameters.
invite_user Write

This endpoint invites a new user as an employee. To update user's role, check out [this article](https://support.brex.com/how-do-i-change-another-user-s-role/).

Lua path
app.integrations.brex.invite_user
Full name
brex.brex_team_create_user
ParameterTypeRequiredDescription
No parameters.
get_current_user Read

This endpoint returns the user associated with the OAuth2 access token.

Lua path
app.integrations.brex.get_current_user
Full name
brex.brex_team_get_me
ParameterTypeRequiredDescription
No parameters.
get_user Read

This endpoint gets a user by ID.

Lua path
app.integrations.brex.get_user
Full name
brex.brex_team_get_user_by_id
ParameterTypeRequiredDescription
No parameters.
update_user Write

This endpoint updates a user. Any parameters not provided will be left unchanged.

Lua path
app.integrations.brex.update_user
Full name
brex.brex_team_update_user
ParameterTypeRequiredDescription
No parameters.
get_limit_user Read

This endpoint gets the monthly limit for the user including the monthly available limit.

Lua path
app.integrations.brex.get_limit_user
Full name
brex.brex_team_get_user_limit
ParameterTypeRequiredDescription
No parameters.
set_limit_user Write

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.

Lua path
app.integrations.brex.set_limit_user
Full name
brex.brex_team_set_user_limit
ParameterTypeRequiredDescription
No parameters.
list_card_accounts Read

This endpoint lists all accounts of card type.

Lua path
app.integrations.brex.list_card_accounts
Full name
brex.brex_transactions_list_card_accounts
ParameterTypeRequiredDescription
No parameters.
list_primary_card_account_statements Read

This endpoint lists all finalized statements for the primary card account.

Lua path
app.integrations.brex.list_primary_card_account_statements
Full name
brex.brex_transactions_list_primary_card_statements
ParameterTypeRequiredDescription
No parameters.
list_cash_accounts Read

This endpoint lists all the existing cash accounts with their status.

Lua path
app.integrations.brex.list_cash_accounts
Full name
brex.brex_transactions_list_accounts
ParameterTypeRequiredDescription
No parameters.
get_primary_cash_account Read

This endpoint returns the primary cash account with its status. There will always be only one primary account.

Lua path
app.integrations.brex.get_primary_cash_account
Full name
brex.brex_transactions_get_primary_account
ParameterTypeRequiredDescription
No parameters.
get_cash_account_by_id Read

This endpoint returns the cash account associated with the provided ID with its status.

Lua path
app.integrations.brex.get_cash_account_by_id
Full name
brex.brex_transactions_get_account
ParameterTypeRequiredDescription
No parameters.
list_cash_account_statements Read

This endpoint lists all finalized statements for the cash account by ID.

Lua path
app.integrations.brex.list_cash_account_statements
Full name
brex.brex_transactions_list_cash_statements
ParameterTypeRequiredDescription
No parameters.
list_transactions_all_card_accounts Read

This endpoint lists all settled transactions for all card accounts. Regular users may only fetch their own "PURCHASE","REFUND" and "CHARGEBACK" settled transactions.

Lua path
app.integrations.brex.list_transactions_all_card_accounts
Full name
brex.brex_transactions_list_primary_card_transactions
ParameterTypeRequiredDescription
No parameters.
list_transactions_selected_cash_account Read

This endpoint lists all transactions for the cash account with the selected ID.

Lua path
app.integrations.brex.list_transactions_selected_cash_account
Full name
brex.brex_transactions_list_cash_transactions
ParameterTypeRequiredDescription
No parameters.
list_trips Read

Lists trips according to the filters passed in the query string.

Lua path
app.integrations.brex.list_trips
Full name
brex.brex_travel_list_trips
ParameterTypeRequiredDescription
No parameters.
get_trip Read

Retrieves a trip by ID.

Lua path
app.integrations.brex.get_trip
Full name
brex.brex_travel_get_trip
ParameterTypeRequiredDescription
No parameters.
list_trip_bookings Read

Lists the bookings within a trip.

Lua path
app.integrations.brex.list_trip_bookings
Full name
brex.brex_travel_list_trip_bookings
ParameterTypeRequiredDescription
No parameters.
get_booking Read

Retrieves a booking by trip and booking ID.

Lua path
app.integrations.brex.get_booking
Full name
brex.brex_travel_get_booking
ParameterTypeRequiredDescription
No parameters.
list_webhooks Read

List the webhooks you have registered

Lua path
app.integrations.brex.list_webhooks
Full name
brex.brex_webhooks_list_webhook_subscriptions
ParameterTypeRequiredDescription
No parameters.
register_webhook Write

Register an endpoint to start receiving selected webhook events

Lua path
app.integrations.brex.register_webhook
Full name
brex.brex_webhooks_create_webhook_subscription
ParameterTypeRequiredDescription
No parameters.
list_webhook_groups Read

Lists webhook groups.

Lua path
app.integrations.brex.list_webhook_groups
Full name
brex.brex_webhooks_list_webhook_groups
ParameterTypeRequiredDescription
No parameters.
create_webhook_group Write

Creates a webhook group.

Lua path
app.integrations.brex.create_webhook_group
Full name
brex.brex_webhooks_create_webhook_group
ParameterTypeRequiredDescription
No parameters.
get_webhook_group Read

Gets a webhook group.

Lua path
app.integrations.brex.get_webhook_group
Full name
brex.brex_webhooks_get_webhook_group
ParameterTypeRequiredDescription
No parameters.
delete_webhook_group Write

Deletes a webhook group and all its members.

Lua path
app.integrations.brex.delete_webhook_group
Full name
brex.brex_webhooks_delete_webhook_group
ParameterTypeRequiredDescription
No parameters.
add_webhook_group_members Write

Adds members to webhook groups.

Lua path
app.integrations.brex.add_webhook_group_members
Full name
brex.brex_webhooks_add_webhook_group_members
ParameterTypeRequiredDescription
No parameters.
list_webhook_group_members Read

Lists the members currently in the specified webhook group.

Lua path
app.integrations.brex.list_webhook_group_members
Full name
brex.brex_webhooks_list_webhook_group_members
ParameterTypeRequiredDescription
No parameters.
remove_webhook_group_members Write

Removes members from webhook groups.

Lua path
app.integrations.brex.remove_webhook_group_members
Full name
brex.brex_webhooks_remove_webhook_group_members
ParameterTypeRequiredDescription
No parameters.
list_webhook_secrets Read

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 wil...

Lua path
app.integrations.brex.list_webhook_secrets
Full name
brex.brex_webhooks_list_webhook_secrets
ParameterTypeRequiredDescription
No parameters.
get_webhook Read

Get details of a webhook

Lua path
app.integrations.brex.get_webhook
Full name
brex.brex_webhooks_get_webhook_subscription
ParameterTypeRequiredDescription
No parameters.
update_webhook Write

Update a webhook. You can update the endpoint url, event types that the endpoint receives, or temporarily deactivate the webhook.

Lua path
app.integrations.brex.update_webhook
Full name
brex.brex_webhooks_update_webhook_subscription
ParameterTypeRequiredDescription
No parameters.
unregister_webhook Write

Unregister a webhook if you want to stop receiving webhook events

Lua path
app.integrations.brex.unregister_webhook
Full name
brex.brex_webhooks_delete_webhook_subscription
ParameterTypeRequiredDescription
No parameters.