Skip to content

Click2CallImportBlacklistPhones

POST click2call/blacklist/import

Imports up to 10 000 numbers in one request — a regulator list, or a DNC export from another system.

A broken number does not abort the import: it lands in failed with its reason while the rest is applied. A regulator file with three malformed rows must not leave the other 9 997 numbers callable.

Access Control

Allowed role: admin.

Request

POST https://{broker_domain}/click2call/blacklist/import
{
  "phones": [
    "+380950000000",
    "+380671111111"
  ],
  "source": "REGULATOR",
  "reason": "National DNC registry"
}
{
  "command": "Click2CallImportBlacklistPhones",
  "extID": "1",
  "data": {
    "phones": [
      "+380950000000",
      "+380671111111"
    ],
    "source": "REGULATOR",
    "reason": "National DNC registry"
  }
}
const res = await platform.Click2CallImportBlacklistPhones({
  phones: [
    "+380950000000",
    "+380671111111"
  ],
  source: "REGULATOR",
  reason: "National DNC registry"
});

Request Data

Field Type Required Description
phones array Yes Numbers, 1..10000 items
source enum No Where the list came from: MANUAL, IMPORT, REGULATOR, CUSTOMER_REQUEST, SYSTEM. Default IMPORT
reason string No Free-form explanation applied to every entry
expiresAt string No YYYY-MM-DD HH:mm:ss. Empty means the block never expires

Response Data

total is what was sent, not what was applied: created + updated + failed.length accounts for every row.

{
  "total": 3,
  "created": 2,
  "updated": 0,
  "restored": 0,
  "failed": [
    { "phone": "not-a-number", "error": "Phone 'not-a-number' is too short to blacklist" }
  ]
}

Errors

Code Error Description
400 VALIDATION_ERROR Empty list, or more than 10 000 numbers
500 INTERNAL_ERROR Storage error