Skip to main content

Proxies

Commands for managing Pre-Configured Proxies.

List Proxies

bt proxies

Lists all Proxies in your tenant with pagination. When run interactively, selecting a Proxy provides options to view details, stream logs, or delete.

Flags

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY env varManagement API key
--page-pinteger1Page number to fetch

Required Permissions

proxy:read

Example

bt proxies -p 2

Create Proxy

bt proxies create

Creates a new Pre-Configured Proxy. When flags are omitted, the CLI will interactively prompt for required values.

Flags

Basic

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY env varManagement API key
--name-nstring(prompted)Name of the Proxy
--destination-url-ustring(prompted)URL to which requests will be proxied
--application-id-istringApplication ID (required for node-bt transforms)
--configuration-cfile pathPath to .env format configuration file
--require-auth-abooleantrueRequire Basis Theory authentication

Request Transform

FlagShortTypeDefaultDescription
--request-transform-code-qfile pathPath to JavaScript file with request transform logic
--request-transform-imagestringRuntime image: node-bt or node22
--request-transform-timeoutinteger10Timeout in seconds, 1–30 (node22 only)
--request-transform-warm-concurrencyinteger0Warm instances, 0–1 (node22 only)
--request-transform-resourcesstringstandardResource tier: standard, large, xlarge (node22 only)
--request-transform-dependenciesfile pathPath to JSON dependencies file (node22 only)
--request-transform-permissionsstring[]Permission grants, repeatable (node22 only)

Response Transform

FlagShortTypeDefaultDescription
--response-transform-code-sfile pathPath to JavaScript file with response transform logic
--response-transform-imagestringRuntime image: node-bt or node22
--response-transform-timeoutinteger10Timeout in seconds, 1–30 (node22 only)
--response-transform-warm-concurrencyinteger0Warm instances, 0–1 (node22 only)
--response-transform-resourcesstringstandardResource tier: standard, large, xlarge (node22 only)
--response-transform-dependenciesfile pathPath to JSON dependencies file (node22 only)
--response-transform-permissionsstring[]Permission grants, repeatable (node22 only)

Advanced

FlagTypeDefaultDescription
--asyncbooleanfalseDon't wait for the Proxy to be ready (node22 only)
The legacy node-bt runtime requires --application-id for transforms. The node22 runtime does not.
The --async flag is only valid when at least one transform uses the node22 runtime.

Required Permissions

proxy:create

Examples

Create a Proxy with a node22 request transform:

bt proxies create \
-n "My Proxy" \
-u "https://api.example.com" \
--request-transform-code ./request.js \
--request-transform-image node22 \
--request-transform-dependencies ./package.json \
--request-transform-timeout 15

Create a Proxy with legacy node-bt transform:

bt proxies create \
-n "My Proxy" \
-u "https://api.example.com" \
-i "your-application-id" \
--request-transform-code ./request.js \
--request-transform-image node-bt

Update Proxy

bt proxies update <id>

Updates an existing Proxy.

Arguments

ArgumentRequiredDescription
idYesThe Proxy ID to update

Flags

All flags from Create Proxy, plus:

FlagShortTypeDefaultDescription
--watch-wbooleanfalseWatch code and configuration files for changes and auto-update
--logs-lbooleanfalseStream logs after update
The --watch flag monitors your code and configuration files for changes, automatically redeploying when files are saved. This is useful during development.

Required Permissions

proxy:update

Examples

Update and watch for file changes:

bt proxies update 03858bf5-32d3-4a2e-b74b-daeea0883bca \
--request-transform-code ./request.js \
-w

Update and stream logs:

bt proxies update 03858bf5-32d3-4a2e-b74b-daeea0883bca \
--request-transform-code ./request.js \
-l

Delete Proxy

bt proxies delete <id>

Deletes a Proxy. By default, the CLI will prompt for confirmation before deleting.

Arguments

ArgumentRequiredDescription
idYesThe Proxy ID to delete

Flags

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY env varManagement API key
--yes-ybooleanfalseSkip confirmation prompt

Required Permissions

proxy:delete

Example

bt proxies delete 03858bf5-32d3-4a2e-b74b-daeea0883bca -y

Proxy Logs

bt proxies logs [id]

Streams real-time logs from a Proxy. If no ID is provided, the CLI will prompt you to select a Proxy from a list.

Arguments

ArgumentRequiredDescription
idNoThe Proxy ID to stream logs from

Flags

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY env varManagement API key
--port-pintegerPort for the local logs server
Streaming Proxy logs requires proxy:update permission, not just proxy:read.

Required Permissions

proxy:update

Example

bt proxies logs 03858bf5-32d3-4a2e-b74b-daeea0883bca -p 3000