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.

https://api-106.dxi.eu/database.php?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
https://api-106.dxi.eu/database.php?token={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" ?>
<result>
    <success>1</success>
    <total>2</total>
    <list>
        <dnc>
            <ddi>{phone_number}</ddi>
            <qid>{queue_ID}</qid>
            <urn>{record_URN}</urn>
            <when>{timestamp_number_placed_in_DNC}</when>
        </dnc>
    </list>
</result>

How can we help you?

X