Developer workbench
Manage deployments with the REST API, MCP or CLI.
Your first API request
Use a token with read access to list the bots it can see. In your shell, set BH_PORTAL_URL to your dashboard origin and BH_API_TOKEN to the token from Account → AI agents.
GET/api/v1/botscurl --fail-with-body \
-H "Authorization: Bearer $BH_API_TOKEN" \
"$BH_PORTAL_URL/api/v1/bots"200 OK{
"bots": []
}When no bots are visible to this token.
REST API reference
View OpenAPI JSONread26 operations
Inspect your account, deployments, runtime availability, domains, status and logs.
GET/api/v1/me
- Operation ID
whoami- Required scopes
read
GET/api/v1/plans
- Operation ID
list_plans- Required scopes
read
GET/api/v1/bots
- Operation ID
list_bots- Required scopes
read
GET/api/v1/bots/{id}
- Operation ID
get_bot- Required scopes
read
GET/api/v1/bots/{id}/status
- Operation ID
get_status- Required scopes
read
GET/api/v1/bots/{id}/usage
- Operation ID
get_usage- Required scopes
read
GET/api/v1/bots/{id}/logs
- Operation ID
get_logs- Required scopes
read
GET/api/v1/bots/{id}/logs/stream
- Operation ID
tail_logs- Required scopes
read
GET/api/v1/deployments/{id}/database
Read an owned database endpoint and authentication method. Download the private client identity in the owner dashboard.
- Operation ID
get_database_connection- Required scopes
read
GET/api/v1/pool
Read account plan capacity and reserved resources.
- Operation ID
get_resource_pool- Required scopes
read
GET/api/v1/runtimes
- Operation ID
list_runtimes- Required scopes
read
GET/api/v1/deployments
- Operation ID
list_deployments- Required scopes
read
GET/api/v1/deployments/{id}
- Operation ID
get_deployment- Required scopes
read
GET/api/v1/deployments/{id}/backups/history
List automatic recovery points and the deployment’s backup interval and retention.
- Operation ID
list_recovery_points- Required scopes
read- Query parameters
before
GET/api/v1/deployments/{id}/domains
List attached hostnames. The domain service assigns the default deployment address on first use.
- Operation ID
list_domains- Required scopes
read
GET/api/v1/deployments/{id}/releases
- Operation ID
get_site_releases- Required scopes
read
GET/api/v1/deployments/{id}/runs
- Operation ID
get_job_runs- Required scopes
read
GET/api/v1/deployments/{id}/ports
List assigned deployment ports, the per-deployment limit, and the current revision.
- Operation ID
list_ports- Required scopes
read
GET/api/v1/projects
- Operation ID
list_projects- Required scopes
read
GET/api/v1/docs/search
- Operation ID
search_docs- Required scopes
read- Query parameters
query,limit
GET/api/v1/docs/{slug}
- Operation ID
get_doc- Required scopes
read
GET/api/v1/templates
- Operation ID
list_templates- Required scopes
read- Query parameters
sort,category,q,official,page,perPage
GET/api/v1/templates/{slug}
- Operation ID
get_template- Required scopes
read
GET/api/v1/deployments/{id}/check
- Operation ID
check_deployment- Required scopes
read- Query parameters
path
GET/api/v1/deployments/{id}/diagnose
- Operation ID
diagnose_deployment- Required scopes
read
GET/api/v1/deployments/{id}/logs/search
- Operation ID
search_logs- Required scopes
read- Query parameters
pattern,context
manage61 operations
Operate owned deployments, files, variables, packages, domains and backups.
POST/api/v1/bots/{id}/power
- Operation ID
power- Required scopes
manage- JSON fields
signal,confirm
GET/api/v1/bots/{id}/env
- Operation ID
get_env- Required scopes
manage
POST/api/v1/bots/{id}/token
- Operation ID
set_bot_token- Required scopes
manage- JSON fields
token,confirm
POST/api/v1/bots/{id}/env
- Operation ID
set_env- Required scopes
manage- JSON fields
values,confirm
GET/api/v1/bots/{id}/files
- Operation ID
list_files- Required scopes
manage- Query parameters
directory
GET/api/v1/bots/{id}/files/read
- Operation ID
read_file- Required scopes
manage- Query parameters
path
POST/api/v1/bots/{id}/files/write
- Operation ID
write_file- Required scopes
manage- JSON fields
path,content,confirm
POST/api/v1/bots/{id}/files/upload
- Operation ID
upload_files- Required scopes
manage- JSON fields
path,base64,confirm
POST/api/v1/bots/{id}/files/extract
- Operation ID
extract_file- Required scopes
manage- JSON fields
path,confirm
DELETE/api/v1/bots/{id}
- Operation ID
delete_bot- Required scopes
manage- JSON fields
confirm
PATCH/api/v1/deployments/{id}/allocation
Reserve and apply new native resource limits to an owned pool deployment.
- Operation ID
resize_deployment- Required scopes
manage- JSON fields
resources,confirm
POST/api/v1/deployments/{id}/runtime
Stop the deployment, preserve project files, and reinstall the selected runtime. Check setup status before starting.
- Operation ID
change_runtime- Required scopes
manage- JSON fields
profile,confirm
GET/api/v1/deployments/{id}/startup
Read the current workload profile, runtime family and entry file.
- Operation ID
get_startup- Required scopes
manage
PATCH/api/v1/deployments/{id}/startup
Set the entry file relative to the deployment root. The change takes effect on the next start.
- Operation ID
set_startup- Required scopes
manage- JSON fields
entry,confirm
POST/api/v1/deployments/{id}/files/folder
- Operation ID
create_folder- Required scopes
manage- JSON fields
path
POST/api/v1/deployments/{id}/files/delete
- Operation ID
delete_file- Required scopes
manage- JSON fields
path,confirm
GET/api/v1/deployments/{id}/packages
List dependencies declared in the root package.json or requirements.txt.
- Operation ID
list_packages- Required scopes
manage
POST/api/v1/deployments/{id}/packages
Add or update a Node.js or Python dependency declaration. Start the deployment to install it. Update lockfiles or complex requirements through the file editor.
- Operation ID
set_package- Required scopes
manage- JSON fields
name,version,confirm
POST/api/v1/deployments/{id}/packages/remove
Remove a dependency declaration from the root manifest.
- Operation ID
remove_package- Required scopes
manage- JSON fields
name,confirm
GET/api/v1/deployments/{id}/backups
List file backups in the deployment’s managed storage and the plan’s retention limit.
- Operation ID
list_backups- Required scopes
manage
GET/api/v1/deployments/{id}/backups/detail
Inspect one restore point belonging to this deployment.
- Operation ID
get_backup- Required scopes
manage- Query parameters
backup
POST/api/v1/deployments/{id}/backups
Request a managed backup. Completed backups rotate according to the plan’s retention policy.
- Operation ID
create_backup- Required scopes
manage- JSON fields
confirm
POST/api/v1/deployments/{id}/backups/restore
Restore a verified file backup. The panel stops the deployment and creates a rollback checkpoint before replacing files.
- Operation ID
restore_backup- Required scopes
manage- JSON fields
backup,confirm
POST/api/v1/deployments/{id}/domains
Attach a custom hostname and return its one-time TXT proof and CNAME target.
- Operation ID
register_domain- Required scopes
manage- JSON fields
host,confirm
POST/api/v1/deployments/{id}/domains/verify
Check the custom hostname’s CNAME and TXT proof with the domain service.
- Operation ID
verify_domain- Required scopes
manage- JSON fields
domain
DELETE/api/v1/deployments/{id}/domains/custom
- Operation ID
remove_domain- Required scopes
manage- JSON fields
domain,confirm
POST/api/v1/deployments/{id}/runs
Request a manual run from an active script worker.
- Operation ID
request_job_run- Required scopes
manage- JSON fields
confirm
POST/api/v1/deployments/{id}/ports
Assign one additional native port from the configured node pool.
- Operation ID
allocate_port- Required scopes
manage- JSON fields
revision
DELETE/api/v1/deployments/{id}/ports
Release one managed secondary port by its allocation ID.
- Operation ID
release_port- Required scopes
manage- JSON fields
revision,allocation_id
POST/api/v1/projects
- Operation ID
create_project- Required scopes
manage- JSON fields
name
DELETE/api/v1/projects/{id}
- Operation ID
delete_project- Required scopes
manage- JSON fields
confirm
POST/api/v1/deployments/{id}/move
- Operation ID
move_deployment- Required scopes
manage- JSON fields
toProjectId
PATCH/api/v1/deployments/{id}
- Operation ID
update_deployment- Required scopes
manage- JSON fields
name,confirm
GET/api/v1/deployments/{id}/restart-policy
- Operation ID
get_restart_policy- Required scopes
manage
PATCH/api/v1/deployments/{id}/restart-policy
- Operation ID
set_restart_policy- Required scopes
manage- JSON fields
enabled,confirm
GET/api/v1/deployments/{id}/git
- Operation ID
get_git- Required scopes
manage
PATCH/api/v1/deployments/{id}/git
- Operation ID
set_auto_pull- Required scopes
manage- JSON fields
autoPull,confirm
GET/api/v1/deployments/{id}/sftp
- Operation ID
get_sftp- Required scopes
manage
PATCH/api/v1/deployments/{id}/env
- Operation ID
update_env_key- Required scopes
manage- JSON fields
key,value,confirm
POST/api/v1/deployments/{id}/env/clear
- Operation ID
clear_env_key- Required scopes
manage- JSON fields
key,confirm
GET/api/v1/deployments/{id}/env/changes
- Operation ID
get_env_changes- Required scopes
manage- Query parameters
page
GET/api/v1/deployments/{id}/files/content
- Operation ID
read_file_content- Required scopes
manage- Query parameters
path,offset,limit
POST/api/v1/deployments/{id}/files/content
- Operation ID
write_file_content- Required scopes
manage- JSON fields
path,content,mode,confirm
POST/api/v1/deployments/{id}/files/read-many
- Operation ID
read_many_files- Required scopes
manage- JSON fields
paths,maxBytes
POST/api/v1/deployments/{id}/files/writeMany
- Operation ID
write_many_files- Required scopes
manage- JSON fields
files,confirm
POST/api/v1/deployments/{id}/files/edit
- Operation ID
edit_file- Required scopes
manage- JSON fields
oldString,newString,replaceAll,path,confirm
POST/api/v1/deployments/{id}/files/editMany
- Operation ID
edit_many_file- Required scopes
manage- JSON fields
path,edits,confirm
GET/api/v1/deployments/{id}/files/tree
- Operation ID
file_tree- Required scopes
manage- Query parameters
path,depth,maxEntries,includeVendor
GET/api/v1/deployments/{id}/files/search
- Operation ID
search_files- Required scopes
manage- Query parameters
path,query,regex,caseSensitive,glob,maxResults
GET/api/v1/deployments/{id}/files/outline
- Operation ID
file_outline- Required scopes
manage- Query parameters
path
POST/api/v1/deployments/{id}/files/index
- Operation ID
file_index- Required scopes
manage- JSON fields
path,ignore,hashMaxBytes,digest
GET/api/v1/deployments/{id}/files/history
- Operation ID
file_history- Required scopes
manage- Query parameters
path
POST/api/v1/deployments/{id}/files/restore
- Operation ID
restore_file- Required scopes
manage- JSON fields
path,versionId,confirm
POST/api/v1/deployments/{id}/files/rename
- Operation ID
rename_file- Required scopes
manage- JSON fields
root,from,to,confirm
POST/api/v1/deployments/{id}/files/move
- Operation ID
move_files- Required scopes
manage- JSON fields
files,to,confirm
POST/api/v1/deployments/{id}/files/copy
- Operation ID
copy_file- Required scopes
manage- JSON fields
location,confirm
POST/api/v1/deployments/{id}/files/chmod
- Operation ID
chmod_file- Required scopes
manage- JSON fields
root,file,mode,confirm
POST/api/v1/deployments/{id}/files/compress
- Operation ID
compress_files- Required scopes
manage- JSON fields
root,files,confirm
POST/api/v1/deployments/{id}/files/decompress
- Operation ID
decompress_file- Required scopes
manage- JSON fields
root,file,removeArchive,confirm
GET/api/v1/deployments/{id}/files/download-url
- Operation ID
file_download_url- Required scopes
manage- Query parameters
path
POST/api/v1/deployments/{id}/files/upload-url
- Operation ID
file_upload_url- Required scopes
manage- JSON fields
path,confirm
deploy10 operations
Request deployment setup, publish revisions and configure GitHub with manage access.
POST/api/v1/bots
- Operation ID
create_bot- Required scopes
deploy- JSON fields
name,runtime,tier,period
POST/api/v1/checkout
- Operation ID
start_checkout- Required scopes
deploy- JSON fields
name,runtime,tier,period
POST/api/v1/bots/{id}/upgrade
- Operation ID
request_upgrade- Required scopes
deploy- JSON fields
tier,period
POST/api/v1/bots/{id}/github
- Operation ID
connect_github- Required scopes
deploy,manage- JSON fields
repo,branch,confirm
POST/api/v1/bots/{id}/deploy
- Operation ID
deploy- Required scopes
deploy- JSON fields
confirm
POST/api/v1/pool/reservations/{id}/release
Release a named pending pool reservation before native creation starts.
- Operation ID
release_reservation- Required scopes
deploy- JSON fields
confirm
POST/api/v1/pool/checkout
Return the human billing page to confirm an account plan.
- Operation ID
choose_account_plan- Required scopes
deploy- JSON fields
plan,period
POST/api/v1/deployments
Create an owned workload by reserving resources in the account plan. Free claims require the owner in the browser.
- Operation ID
create_deployment- Required scopes
deploy- JSON fields
name,profile,resources,tier,period
POST/api/v1/deployments/{id}/releases
Request publication or rollback from a running static website worker.
- Operation ID
request_site_release- Required scopes
deploy- JSON fields
action,confirm
POST/api/v1/deployments/{id}/sync
- Operation ID
sync_git- Required scopes
deploy- JSON fields
confirm
billing-read1 operation
Read subscription and billing status.
GET/api/v1/billing
- Operation ID
billing_status- Required scopes
billing-read
No matching operations. Try a method, path or scope.
MCP server
Connect a Streamable HTTP client to /mcp on your dashboard origin. Your token’s scopes and selected deployments determine which tools the client can use.
- Editor setup
- Available tools
- 101 tools
- Check the connection
- Ask your editor to run
list_deploymentsusing a token withreadaccess. - GitHub deployments
- Connect a repository and branch in the Deploy tab to deploy changes from your editor. Find your runtime guide
Tokens and OAuth
Choose which deployments a credential can reach, set its expiry and revoke access in Account → AI agents.
Bearer tokens
Copy the token when you create it. Send it in the Authorization header as shown in the first request. A request outside the granted scopes returns HTTP 403.
OAuth for applications
- Register a public client and its callback URL at
/oauth/register. - Request consent at
/oauth/authorizewith state, scopes and an S256 PKCE challenge. Set the resource to your dashboard origin plus/api/v1for REST or/mcpfor an editor. - Exchange the authorization code and verifier at
/oauth/token.
Command-line tools
Download CLI packageUse Node.js 22 or newer and Git. Export BH_API_TOKEN and BH_PORTAL_URL in your shell. Use your HTTPS dashboard origin or http://127.0.0.1 with the local port.
Use read to list and link a deployment. Add manage before syncing files. The dry run previews changes. Starting the watcher uploads them and then syncs as you edit.
npm install -g ./bothosting-cli.tgz
bothosting list
bothosting link DEPLOYMENT_ID
bothosting push --dry-run
bothosting watchInstall from the download folder. Run the remaining commands in your project folder, replacing DEPLOYMENT_ID with an ID from your list. Press Ctrl+C to stop watching.