Calling: the call log, placing calls and call routing
Calls on a bubblr line: read the call log, place calls from the line's number, transfer and hang up, choose who answers, and get voicemails.
A line with Calling on its plan takes calls on the same number it texts from. Calls ring your team in the app, a
voice agent, a phone number you choose, or voicemail, in the order you set. Everything about them is in the API too.
Keys need calls:read to read and calls:write to place, steer and configure calls.
Is calling working?
curl https://api.bubblr.io/v1/profiles/prf_2Wq8nT4kLm/calling -H "Authorization: Bearer $BUBBLR_API_KEY"{ "object": "calling", "enabled": true, "phone_number": "+14155550123", "state": "working",
"can_place_calls": true, "can_receive_calls": true, "problems": [], "message": null }state is off (no Calling on the line), setting_up, working, having_trouble or suspended. problems
lists what your team can fix itself: payment_required, calling_not_subscribed, spending_cap_reached,
calling_suspended, fair_use_paused. GET /v1/calling shows the team's minutes this month, per line.
The call log
curl "https://api.bubblr.io/v1/profiles/prf_2Wq8nT4kLm/calls?limit=20" -H "Authorization: Bearer $BUBBLR_API_KEY"Calls come newest first and page like messages (before, next_before). Filter with direction
(inbound/outbound), with (the other person's number, any format), chat_id or status. A call has its
direction, from, to, status (queued, ringing, in_progress, completed, busy, no_answer, failed,
canceled), who answered (handled_by: a teammate user:usr_…, a voice agent voice_ai:vep_…, a forwarded
number, voicemail or team), its times, duration_sec, any transfers, and voicemail.
GET /v1/contacts/{address}/calls lists calls with one person across all your lines.
Voicemail
When nobody answers, callers hear the line's greeting and leave a message. The call then has voicemail: { url, duration_sec, transcription } and you get call.voicemail (and call.transcription once it's transcribed, if
transcription is on). GET /v1/calls/{call_id}/recording answers a 302 to the MP3.
The greeting is either a recording you upload (PUT /v1/profiles/{profile_id}/voicemail-greeting with the MP3 or
WAV file as the body, up to 5 MB and 2 minutes) or the routing's voicemail.greeting text, read aloud.
Placing a call
curl -X POST https://api.bubblr.io/v1/profiles/prf_2Wq8nT4kLm/calls \
-H "Authorization: Bearer $BUBBLR_API_KEY" -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" \
-d '{"to": "+14155550142", "endpoint_id": "vep_5Qs2hJ9nVb"}'bubblr calls to from the line's own number. When they answer, it connects your voice agent (endpoint_id) or rings
a teammate's app (user_id). The answer is 201 with the call; follow it with call.* events. Like sends, calls need
an Idempotency-Key: a retry with the same key answers the same call and never dials twice.
Calls go to US and Canadian numbers only. Emergency and N11 numbers are always refused
(403 emergency_number_blocked), and so are premium and Caribbean +1 numbers.
Transfers and hang-ups
While a call is live:
POST /v1/calls/{call_id}/transfer {"to": "team"}moves the caller to your team's apps.tocan also be a US or Canadian number, a teammate (usr_…) or another voice agent (vep_…). This is how a voice agent hands a caller to a person.POST /v1/calls/{call_id}/hangupends it for everyone.
Both answer 409 call_not_active once the call has ended.
Who answers: call routing
PUT /v1/profiles/{profile_id}/call-routing sets it:
strategy |
What happens |
|---|---|
team (default) |
Every teammate's app rings for ring_seconds, then voicemail. |
team_first |
The team, then your voice agent, then voicemail. |
ai_first |
Your voice agent for ai_timeout_seconds (default 10), then the team, then voicemail. |
ai_after_hours |
Inside hours like team; outside like ai_first. |
forward |
forward_to, a phone number of yours, rings for forward_seconds (default 20), then voicemail. |
{ "strategy": "ai_after_hours", "endpoint_id": "vep_5Qs2hJ9nVb",
"hours": { "timezone": "America/New_York", "days": [1, 2, 3, 4, 5], "start": "09:00", "end": "18:00" },
"voicemail": { "greeting": "Thanks for calling Parkside Dental. Leave a message and we'll call you back.", "transcribe": true } }A forwarded call shows the caller's own number on your phone. Numbers that would send the call straight back to one of
your lines are refused (400 forward_loop).
Events
call.ringing, call.answered, call.transferred, call.ended, call.voicemail and call.transcription, each with
the call; calling.cap_warning when the team reaches 80% and 100% of a monthly minutes cap. See
Webhooks and events.
Fair use
Calling is unlimited for normal business use. A line far beyond that in a calendar month has its outgoing calls paused
until the 1st (403 fair_use_paused, and in the line's calling problems); incoming calls always ring.
Auto-dialers, bulk outbound and call centres aren't included. Plans are on the pricing page.
Next: put your own voice AI on the line with voice agents.