Do-Not-Call
Check numbers against the Do-Not-Call list
POST /v1/dnc/check
- Scope
dnc:check- Tier
- Tier 1
- Data
- Personal data
- Idempotency
- Idempotency-Key: not used (this request changes nothing, so a retry is always safe)
- Limit
- Up to 100 numbers per request
Read-only; nothing is written, so a retry is always safe and no Idempotency-Key is needed. The answer is only listed or not listed: never who added a number, when, or why. At most 100 numbers, in E.164 form.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-Correlation-ID | header | string | no | Your own trace value, logged with the request. Metadata only, never identity. (min length 1; max length 128) |
Request body
The numbers.
JSON: DncCheckRequest
Response
200: One result per input number, in input order.
| Header | Meaning |
|---|---|
X-Request-ID | The DialerBee request id. Quote it to support. Every response carries X-Request-ID: req_<ULID>, or edge_<32 hex> when the edge answered before the request reached the API. |
Cache-Control | Always no-store. |
Examples
Request example
curl
curl -sS -X POST \
"https://app.dialerbee.com/api/v1/dnc/check" \
-H "Authorization: Bearer $DIALERBEE_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"phones": [
"+12125550101",
"+12125550102"
]
}'
Python (SDK)
from dialerbee import DialerBee
db = DialerBee() # reads DIALERBEE_API_KEY from the environment
result = db.dnc.check(phones=["+12125550101", "+12125550102"])
Response example
200
{
"data": [
{
"phone": "+12125550101",
"listed": false
},
{
"phone": "+12125550102",
"listed": true
}
]
}
Error examples
400 batch_too_large
{
"type": "https://docs.dialerbee.com/errors/batch-too-large",
"title": "Batch too large",
"status": 400,
"detail": "Too many items in one request.",
"instance": "urn:dialerbee:request:req_01K6BZ3M9X4T7Q2V8N5R6P1W0C",
"code": "batch_too_large",
"request_id": "req_01K6BZ3M9X4T7Q2V8N5R6P1W0C"
}
403 insufficient_scope
{
"type": "https://docs.dialerbee.com/errors/insufficient-scope",
"title": "Not permitted",
"status": 403,
"detail": "The API client does not hold the scope this operation requires.",
"instance": "urn:dialerbee:request:req_01K6BZ3M9X4T7Q2V8N5R6P1W0C",
"code": "insufficient_scope",
"request_id": "req_01K6BZ3M9X4T7Q2V8N5R6P1W0C"
}
400 validation_failed
{
"type": "https://docs.dialerbee.com/errors/validation-failed",
"title": "Invalid request",
"status": 400,
"detail": "The request is not valid.",
"instance": "urn:dialerbee:request:req_01K6BZ3M9X4T7Q2V8N5R6P1W0C",
"code": "validation_failed",
"request_id": "req_01K6BZ3M9X4T7Q2V8N5R6P1W0C",
"errors": [
{
"pointer": "/leads/1/phone",
"code": "missing"
}
]
}
Errors
| Status | Code | Title |
|---|---|---|
| 401 | invalid_api_key | Invalid API key |
| 403 | api_access_disabled | API access disabled |
| 403 | ip_not_allowed | IP address not allowed |
| 403 | insufficient_scope | Not permitted |
| 400 | credential_in_url | Credential in URL |
| 400 | credential_in_body | Credential in body |
| 400, 422 | validation_failed | Invalid request |
| 400 | batch_too_large | Batch too large |
| 413 | payload_too_large | Payload too large |
| 415 | unsupported_media_type | Unsupported media type |
| 429 | rate_limit_exceeded | Too many requests |
| 503 | temporarily_unavailable | Temporarily unavailable |
| 503 | upstream_unavailable | Temporarily unavailable |
| 502 | upstream_invalid_response | Upstream error |
| 500 | internal_error | Internal error |
Objects
DncCheckRequest
| Field | Type | Required | Description |
|---|---|---|---|
phones | array of string (E.164 phone) | yes | (min items 1; max items 100) |
DncCheckResult
| Field | Type | Required | Description |
|---|---|---|---|
data | array of DncCheckItem | yes |
DncCheckItem
| Field | Type | Required | Description |
|---|---|---|---|
phone | string (E.164 phone) | yes | A phone number in E.164 form. |
listed | boolean | yes |