Quickstart
1. Get an API client and a key
API access is switched on per account by DialerBee. Once it is on for your account, an account admin creates an API client for your integration in the DialerBee console, grants it the scopes it needs, and creates a key for it. The key is shown once: copy it straight into your secret store.
A key looks like dbk_live_<credential id>_<secret>.
2. Keep the key out of your code
export DIALERBEE_API_KEY='dbk_live_...' # from your secret store, never from source code
3. Check the key
GET /v1/me works with any active key, even one with no scopes yet. It tells you which API client the
key belongs to, which scopes it holds and which Tier-2 capabilities are switched on for your account.
curl -sS https://app.dialerbee.com/api/v1/me \
-H "Authorization: Bearer $DIALERBEE_API_KEY"
{
"client": {
"id": "cli_0f8fad5b-d9cb-469f-a165-70867728950e",
"name": "CRM sync (production)",
"environment": "live"
},
"account": {
"name": "Example Clinic"
},
"scopes": [
"leads:read",
"leads:write",
"calls:read",
"recordings:read",
"webhooks:read"
],
"tier2": {
"campaign_resume": false,
"callback_write": false,
"appointment_write": false,
"consent_write": false,
"sms_send": false,
"calls_originate": false
}
}
4. Import two leads
Leads go into a campaign that is paused, draft or ready, through the platform's own checks (phone
validation, duplicates, field rules, the Do-Not-Call screen). Every write that changes data needs an
Idempotency-Key: your own unique value for this batch, so a retry can never import twice.
curl -sS -X POST \
"https://app.dialerbee.com/api/v1/leads/import?campaign_id=cmp_0f8fad5b-d9cb-469f-a165-70867728950e" \
-H "Authorization: Bearer $DIALERBEE_API_KEY" \
-H 'Idempotency-Key: 5f2b7c1e-8a3d-4c6f-9b0e-2d4a6c8e1f3a' \
-H "Content-Type: application/json" \
--data '{
"leads": [
{
"external_id": "CRM-1001",
"phone": "+12125550101",
"full_name": "Ann Lee",
"email": "[email protected]",
"custom_fields": {
"tier": "gold"
}
},
{
"external_id": "CRM-1002",
"phone": "+12125550102",
"full_name": "Omar Haddad"
}
]
}'
Every lead gets its own result, in the order you sent them:
{
"campaign_id": "cmp_0f8fad5b-d9cb-469f-a165-70867728950e",
"data": [
{
"index": 0,
"external_id": "CRM-1001",
"status": "accepted",
"reason": null,
"field": null,
"lead_id": "lead_0f8fad5b-d9cb-469f-a165-70867728950e"
},
{
"index": 1,
"external_id": "CRM-1002",
"status": "duplicate",
"reason": "duplicate_in_campaign",
"field": null,
"lead_id": null
}
],
"summary": {
"received": 2,
"accepted": 1,
"rejected": 1
}
}
5. Read the results
curl -sS "https://app.dialerbee.com/api/v1/calls?limit=5" \
-H "Authorization: Bearer $DIALERBEE_API_KEY"
Or with the Python SDK:
from dialerbee import DialerBee
db = DialerBee() # reads DIALERBEE_API_KEY from the environment
for call in db.calls.list(limit=100):
print(call.id, call.status, call.duration_seconds)
Next steps
- Get results pushed to you instead of polling: Webhooks.
- Handle errors and retries correctly: Errors and Idempotency.
- Try every request from Postman.