curl -X POST https://api.60db.ai/dialer/pool/allocate \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"assign_for": "sip"}'
const bought = await client.dialer.numbers.buy();
console.log('Bought:', bought.data.number);
bought = client.dialer.numbers.buy()
print('Bought:', bought['data']['number'])
Dialer
Buy Number
Allocate a phone number from the shared pool
POST
/
dialer
/
pool
/
allocate
curl -X POST https://api.60db.ai/dialer/pool/allocate \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"assign_for": "sip"}'
const bought = await client.dialer.numbers.buy();
console.log('Bought:', bought.data.number);
bought = client.dialer.numbers.buy()
print('Bought:', bought['data']['number'])
Setup prerequisite: Before buying numbers, complete KYC in the 60db app (Dashboard → Dialer → KYC). KYC is not available through the API. Submit your PAN/Aadhaar and address proof. Until approved, buying returns 403 DIALER_KYC_REQUIRED / DIALER_KYC_PENDING / DIALER_KYC_REJECTED.
Request
Headers
string
required
Bearer token with your API key
string
required
application/json
Body
string
Optional. Specific E.164 number to buy (e.g.
+919876543210). If omitted, the next available number is allocated.string
Optional.
sip or indian_number. Default is the next in rotation.Response
201 Created:{
"success": true,
"data": {
"number": "+919876543210",
"upstream": { "trunk_id": "...", "status": "active" }
}
}
Errors
| Status | Code | Meaning |
|---|---|---|
| 402 | RECHARGE_REQUIRED | Wallet balance too low |
| 403 | DIALER_KYC_REQUIRED | Complete KYC in the 60db app |
| 403 | DIALER_KYC_PENDING | KYC pending approval |
| 403 | DIALER_KYC_REJECTED | KYC rejected; resubmit in app |
| 409 | DIALER_NOT_PROVISIONED | Trunk not set up; use assign_for: "sip" and set up SIP trunk in app |
| 409 | POOL_EMPTY | No numbers available |
| 409 | NUMBER_NOT_AVAILABLE | The specific number requested is taken |
Example
curl -X POST https://api.60db.ai/dialer/pool/allocate \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"assign_for": "sip"}'
const bought = await client.dialer.numbers.buy();
console.log('Bought:', bought.data.number);
bought = client.dialer.numbers.buy()
print('Bought:', bought['data']['number'])