DNCR API integration guide for developers

Integrating a DNCR API means adding one call to your system, made just before a number is dialed or added to a campaign, that asks whether the number is registered on the UAE Do Not Call Registry and blocks it if it is. The integration itself is small, but it must be built carefully: keep API keys on your server, use free test keys while you build, read the result strictly, treat errors and timeouts as "do not call", retry sensibly, respect rate limits and log every check. This guide walks through each part using Dotell's DNCR API, whose full reference is published at api.dotell.ae.

The same principles apply whether you are adding checks to a CRM, a dialer, a lead form or an internal tool.

How the check fits into your flow

Decide exactly where the check happens. Common points are:

  • when a new lead is created or imported
  • just before a campaign list is loaded into the dialer
  • just before an individual number is dialed

Checking close to the time of calling matters, because people can register at any time. Our guide to real-time DNCR checks explains the timing choices.

Authentication and keys

Each request is authenticated with an API key sent in the Authorization header as a Bearer token. Keep keys on your server only. Never place a key in a web page, a mobile app or a browser script, where anyone could read it.

Dotell provides two kinds of key in the client portal:

  • Test keys, which are free and unlimited and never contact the registry. Use them while building and in automated tests.
  • Live keys, which check the real registry and use your plan's allowance.

Store keys in environment variables or a secrets store, rotate them if a key may have been exposed, and use separate keys for separate systems so one can be revoked without affecting the others.

Making a request

A check is a single POST request to the check endpoint with the number in a JSON body. A minimal example with cURL:

curl -X POST https://api.dotell.ae/v1/dncr/check -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"number": "0501234567"}'

The response tells you whether the number is registered. The full list of response fields and accepted number formats is in the API reference, and the client portal's API helper generates ready-made code for cURL, Python, Node.js, PHP, C#, Java and Go.

Testing with predictable results

Test keys return predictable results, so you can write reliable tests: numbers ending in an odd digit return DND (registered) and numbers ending in an even digit return Non-DND. Use this to test both paths in your code, including what your system does with a blocked number, before switching to a live key. The portal's API explorer also shows every error response, so you can test error handling without waiting for a real failure.

Reading the result strictly

Only treat a number as callable when the response clearly says it is not registered. Anything else, including an unexpected value, a missing field or a response you cannot parse, should be treated as "do not call". This rule keeps a coding mistake or an unusual response from letting a registered number through.

Handling errors and timeouts

Plan for failures from the start:

  • Authentication errors usually mean a wrong, revoked or missing key. Alert your team rather than retrying.
  • Allowance or plan errors mean the live plan has expired or its lookups are used up. Stop live checks and alert the account owner.
  • Rate limit responses mean you are sending too fast. Slow down and retry after a pause.
  • Timeouts and server errors may be temporary. Retry a small number of times with increasing waits.

In every failure case, the number should not be dialed until a successful check says it may be. Our guide to VICIdial and DNCR integration shows how this "fail safe" rule works inside a dialer.

Rate limits and bulk checks

Each account has a maximum number of requests per second. For large lists, send requests at a steady pace within that limit rather than all at once, and process results as they return. The portal's API helper includes bulk CSV examples for Python, Node.js and PHP. Our guide to bulk DNCR checks for call centres covers when bulk checking makes sense.

Cleaning numbers before checking

Clean numbers before you send them, so every lookup counts:

  • remove spaces, dashes and brackets, and use one consistent format
  • remove duplicates within the list, so the same number is not checked twice in one run
  • drop numbers that are clearly invalid before they reach the API
  • keep the original value alongside the cleaned one, so records can be traced

Cleaner input means fewer errors, fewer wasted lookups and clearer logs.

Logging every check

Keep a log of each check: the time, a reference to the record, the result and any error. Mask or limit full phone numbers in general logs where possible, and keep the compliance record somewhere access is controlled. These logs are your evidence that each number was checked before it was called.

Connecting to a CRM

If your team works from a CRM, store the latest result and check date on each contact, and use workflows to keep blocked contacts out of call lists. Our guide to DNCR and CRM integration explains the fields and workflows to add.

Going live

Before switching to a live key, confirm that:

  1. both DND and Non-DND paths work with test keys
  2. errors, timeouts and unexpected responses all block the call
  3. retries back off and respect rate limits
  4. keys are stored on the server only
  5. every check is logged

Then switch the key, monitor the first day closely and check usage in the client portal.

Frequently asked questions

Do test keys use our plan's allowance?

No. Test keys are free and unlimited, and they never contact the registry.

What should happen if the API cannot be reached?

The number should not be called. Retry a few times, then hold the call until a successful check is possible.

Can we call the API from a mobile app?

Not directly. Call it from your own server, so the API key is never exposed in the app.

What to do next

A careful integration takes little code and protects every campaign. Get free test keys and the full reference through Dotell's DNCR API, and call us on +971 55 865 6561 if you would like help with your integration.

Thinking through a project like this?

We would rather have a 20-minute conversation about what you actually need than guess. Site surveys are free and without obligation.

Book a free survey