HTTP API
Base URL: https://api.banh.dev/v1. Authenticate with an invocation key and your account ID from banh whoami --json. Keep the key server-side.
curl --fail-with-body https://api.banh.dev/v1/accounts/$BANH_ACCOUNT_ID/workflows/support_triage/runs \ -H "Authorization: Bearer $BANH_API_TOKEN" \ -H 'Content-Type: application/json' \ -d '{"input":{"subject":"Charged twice","message":"Please review the duplicate charge."}}'The response includes id, workflow, version, status, output, decisions and trace.
- 200: completed run.
- Non-2xx with a run: the run failed and was recorded.
- Non-2xx without a run: rejected before running (see limits).
Endpoints
Section titled “Endpoints”| Method | Path | Credentials |
|---|---|---|
| POST | /accounts/:accountId/workflows/:workflow/runs |
Key or login |
| GET | /accounts/:accountId/workflows/:workflow/runs |
Key or login |
| GET | /accounts/:accountId/runs/:runId |
Key or login |
| POST | /accounts/:accountId/workflows/:workflow/versions |
Login |
| GET | /accounts/:accountId/billing |
Login |
| POST | /accounts/:accountId/billing/cancel |
Billing-owner login |
Use the CLI for deploys, keys and billing. Never ship login credentials to a browser.