Skip to main content
ContactNow: Using DNC API from Database.php Endpoint for Viewing DNC List
8x8 Support

ContactNow: Using DNC API from Database.php Endpoint for Viewing DNC List

API dnc is used to read a contact centres DNC list. 

To create access tokens for the ContactNow API, you will need to create a case with 8x8 Technical Support to obtain an API username and key. Once you have the username and key, you can use the instructions on the following link to create a token for using the API functionality.  ContactNow API Access.

Note8x8 does not provide programming support for the ContactNow API. However, further API reference material is linked in the Documentation section at the bottom of this article.

Access the ContactNow API URL

To access any ContactNow API interface, requests need to have an access token. The token will authorize requests for a particular account for a fixed period of time. By default, these requests are restricted to the internet address that requests the token.[Token]&method=ecnow_data&action=[Action]&format=[Format]&raw=1

API Method dnc

The dnc API can only be viewed. The request arguments should be passed as HTTP GET variable. 

  • HTTP Request: GET

  • Method: dnc
  • Action: read
  • Arguments: All these filters are optional
    • qid: queue ID or a comma separated list of queue ID's 
    • tstart: datetime of first call to match
    • tstop: datetime of last call to match

The API will output a number of value

  • ddi - The phone number that has been added to the DNC
  • qid - The queue ID 
  • urn - Record URN
  • when - Timestamp when the DDI was added to th elist DNC
Example of request{token}&method=dnc&action=read&format=json
Example of JSON Response:
    "success": true,
    "total": 1,
    "list": [
            "ddi": "{phone_number}",
            "qid": "{queue_ID}",
            "urn": "{record_URN}",
            "when": "{timestamp_number_placed_in_DNC}"
Example of XML Response:
<?xml version="1.0" encoding="utf-8" ?>