BrexOptions
Defined in: src/core/options.ts:2
Options for constructing a Brex client.
Properties
Section titled “Properties”baseUrl?
Section titled “baseUrl?”
optionalbaseUrl?:string&object|"production"|"staging"
Defined in: src/core/options.ts:12
"production" (default), "staging", or any absolute base URL.
Note: staging is not a sandbox; it does not accept customer tokens.
defaultHeaders?
Section titled “defaultHeaders?”
optionaldefaultHeaders?:Record<string,string>
Defined in: src/core/options.ts:16
Headers merged into every request (per-request headers win).
fetch?
Section titled “fetch?”
optionalfetch?: (input,init?) =>Promise<Response>
Defined in: src/core/options.ts:14
Injectable fetch for tests, proxies, or custom retry layers. Defaults to global fetch.
Parameters
Section titled “Parameters”RequestInfo | URL
RequestInit
Returns
Section titled “Returns”Promise<Response>
token:
string| (() =>string|Promise<string>)
Defined in: src/core/options.ts:7
A Brex API token, or a provider called before every request — useful for OAuth flows where tokens refresh.