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-istring—Optional Application ID. Only supported when at least one transform uses node-bt.
--configuration-cfile path—Path to .env format configuration file
--require-auth-abooleantrueRequire Basis Theory authentication

Request Transform​

The node-bt runtime is deprecated. Use a Node.js runtime image for new Reactors and Proxy code transforms. Migrate away from the node-bt runtime as soon as possible to avoid disruption.
FlagShortTypeDefaultDescription
--request-transform-code-qfile path—Path to JavaScript file with request transform logic
--request-transform-imagestring—Runtime image. Select a Node.js runtime image for new code transforms.
--request-transform-timeoutinteger10Timeout in seconds, 10 to 30 (Node.js runtime images only)
--request-transform-warm-concurrencyinteger0Number of warm instances. The default quota is 0. Request a higher quota if needed. (Node.js runtime images only)
--request-transform-resourcesstringstandardResource tier: standard, large, xlarge (Node.js runtime images only)
--request-transform-package-jsonfile path-Path to a package.json file specifying dependencies (Node.js runtime images only)
--request-transform-permissionsstring[]—Permission grants, repeatable (Node.js runtime images only)

Response Transform​

FlagShortTypeDefaultDescription
--response-transform-code-sfile path—Path to JavaScript file with response transform logic
--response-transform-imagestring—Runtime image. Select a Node.js runtime image for new code transforms.
--response-transform-timeoutinteger10Timeout in seconds, 10 to 30 (Node.js runtime images only)
--response-transform-warm-concurrencyinteger0Number of warm instances. The default quota is 0. Request a higher quota if needed. (Node.js runtime images only)
--response-transform-resourcesstringstandardResource tier: standard, large, xlarge (Node.js runtime images only)
--response-transform-package-jsonfile path-Path to a package.json file specifying dependencies (Node.js runtime images only)
--response-transform-permissionsstring[]—Permission grants, repeatable (Node.js runtime images only)

Advanced​

FlagTypeDefaultDescription
--no-waitbooleanfalseDon't wait for the Proxy to be ready (Node.js runtime images only)
The --no-wait flag is only valid when at least one transform uses a Node.js runtime image.

Required Permissions​

proxy:create

Examples​

Create a Proxy with a node24 request transform:

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

Create a Proxy with the deprecated node-bt runtime:

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-lbooleanfalseOpen the legacy log tunnel after update (deprecated)

For configurable Node.js runtimes, enable runtime-log capture and use logs tail to follow records.

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

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​

Use runtime logs to troubleshoot your Proxy code transforms and inspect their execution details. Review captured logs with logs read, or follow new logs with logs tail.

The Proxy code transform must use a supported Node.js runtime image and have logging enabled.

Use a Management API key with the log:read permission.

Read Runtime Logs​

Read Proxy Runtime Logs
bt proxies logs read '<PROXY_ID>'

Reads Proxy runtime logs from the last hour by default.

Arguments​

ArgumentRequiredDescription
idYesThe Proxy ID to read runtime-log records from

Flags​

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY environment variableManagement API key. Required unless supplied through BT_MANAGEMENT_KEY. See CLI authentication.
--trace-id—string—Match the BT trace ID exactly (case-sensitive).
--level—string—Match one application-log level, such as debug, info, warn, or error. This is not a minimum-severity threshold.
--message-search—string—Match all query words in one message. See Search Runtime-Log Messages.
--transform-type—string—Restrict results to request_transform or response_transform. Omit to include both directions.
--since—stringOne hour before --untilInclude logs at or after this time. See Time Formats.
--until—stringNowInclude logs before this time. See Time Formats.
--format—stringprettyOutput format: pretty, json, or json-pretty. See CLI output formats.

Examples​

Read Proxy Logs from the Last Hour
bt proxies logs read '<PROXY_ID>' --since 1h
Read Proxy Logs in a Fixed Time Range
bt proxies logs read '<PROXY_ID>' --since '2026-10-01T10:00:00Z' --until '2026-10-01T10:15:00Z'

Tail Runtime Logs​

Tail Proxy Runtime Logs
bt proxies logs tail '<PROXY_ID>'

Follows new Proxy runtime logs. Use --since to include earlier logs when starting. Press Ctrl-C to stop.

Arguments​

ArgumentRequiredDescription
idYesThe Proxy ID to tail runtime-log records from

Flags​

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY environment variableManagement API key. Required unless supplied through BT_MANAGEMENT_KEY. See CLI authentication.
--trace-id—string—Match the BT trace ID exactly (case-sensitive).
--level—string—Match one application-log level, such as debug, info, warn, or error. This is not a minimum-severity threshold.
--message-search—string—Match all query words in one message. See Search Runtime-Log Messages.
--transform-type—string—Restrict results to request_transform or response_transform. Omit to include both directions.
--since—stringNew logs onlyInclude logs from this time before following new records. See Time Formats.
--format—stringprettyOutput format: pretty, json, or json-pretty. See CLI output formats.

Tail Renewal​

Interactive sessions ask Keep tailing? every 60 minutes. Press Enter to stop or choose Yes to continue. Noninteractive sessions stop after 60 minutes.

Example​

Tail Proxy Logs with Filtered Catch-up
bt proxies logs tail '<PROXY_ID>' --trace-id '<TRACE_ID>' --message-search 'payment failed' --transform-type response_transform --since 5m

Time Formats​

--since and --until accept either format below. --until is available only with logs read.

Time formatExamplesDetails
Relative duration30m, 1hUse s for seconds, m for minutes, h for hours, d for days, or w for weeks.
Timestamp2026-10-01T12:00:00ZUse an ISO 8601 timestamp with a timezone.

Retrieval Limits​

Both logs read and logs tail are subject to retrieval limits. If you reach a limit, add filters or use logs read with a shorter time range.


Legacy Live Logs (Deprecated)​

The legacy tunnel is deprecated but remains supported for existing workflows. For supported Node.js runtimes, enable runtime logs and use Read Runtime Logs or Tail Runtime Logs instead.

The legacy command opens a local tunnel and modifies the Proxy's logging configuration.

bt proxies logs [id]

If no ID is provided, the CLI prompts you to select a Proxy. The interactive management menu's Logs action and bt proxies update --logs (-l) also open this legacy tunnel.

Arguments​

ArgumentRequiredDescription
idNoThe Proxy ID to open the legacy logs tunnel for

Flags​

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY environment variableManagement API key
--port-pinteger8220Port for the local logs server

Required Permissions​

proxy:update