Base URL
Authentication
Every request must include your organization’s API key in theX-API-Key
header. You create and revoke keys in the dashboard:
click your account in the bottom-left corner of the sidebar, then Brosbots API.
Agent ID
Wherever a path contains{agent_id}, you can pass the agent’s public
ID, e.g. agent_7fK2mQ9xLp3RtV8wYb1N (in the agent editor next to the
agent’s name - click to copy), or its number. Both address the same agent.
In responses, the workflow_id field is the number.
The addresses in this reference (
/agents, /campaigns, /integrations,
/triggers, /usage, /reports) replace earlier ones such as
/workflow/{workflow_id}/calls or /organizations/usage/.... The earlier
addresses keep working unchanged, so existing integrations need no changes.
Build new ones on the addresses in this reference. Field names in request and
response bodies (such as workflow_id, workflow_run_id) have not changed.Quick start: trigger a call
Start an outbound call with an existing agent.phone_number and
initial_context are sibling fields; the agent sees the variables in
initial_context in its prompts as {{initial_context.<key>}}.
POST /agents/{agent_id}/conversations does not place a call. It only
creates a run record for a browser session (mode: webrtc,
smallwebrtc) or a chat (chat).Reading a call
After the call ends, fetch the run (gathered data, duration, cost, SMS, file links):
The list
GET /agents/{agent_id}/conversations returns initial_context,
gathered_context and duration_seconds for every call, so you don’t need
to fetch each one. Download links, logs and SMS come only with a single run.
Transcript
role is user (the caller) or assistant (the agent). Consecutive
fragments of one speaker are joined into one turn; start and end are the
timestamps of its first and last fragment (the file records no end of
speech). download_url is the raw text file, one fragment per line:
Recording
download_url (WAV), content_type and expires_at. expires_in
is the link’s lifetime in seconds, from 60 to 86400 (default 3600). Both
endpoints return 404 while the call is in progress and the file isn’t
saved yet, and when a retention policy has already deleted it.
Deleting a call
204. Deletion is irreversible: the recording and transcript leave
storage, and the call loses its initial_context (including the phone
number), gathered_context, logs, the SMS sent during it and its
integration delivery records. The call disappears from the history and the
run endpoints return 404 for it. Its duration and cost stay in the
organization’s billing records, as accounting law requires.
Conventions
- Request and response bodies are JSON (
Content-Type: application/json). - Timestamps are ISO 8601 with a timezone.
- Lists are paginated with
page/limitparameters; responses includetotal_count/total_pages. - Errors use standard HTTP status codes with a JSON body:
Limits
There is no fixed per-key request-rate limit today.429 comes from the
endpoints that place calls (POST /agents/{agent_id}/calls,
POST /triggers/{trigger_id}/calls) when every outbound channel of the organization
is busy; the Retry-After header says how many seconds to wait. A call
outside 08:00-21:00 the recipient’s local time ends in 409 with a
Retry-After header and a detail.retry_at field. A number on the
organization’s Do not call list ends in 403 with a detail starting with
do_not_call.
Handle 429 generally: wait as long as Retry-After says, or back off
exponentially when the header is absent. A request-rate limit may be
introduced in the future.
Interactive documentation
An always up-to-date, interactive reference (Swagger UI):/api/v1/public-docs,
and the raw OpenAPI specification:
/api/v1/public-openapi.json.