Skip to main content
 
8x8 Support

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

Objective

To use API dnc to read a contact centers DNC list. 

Note-Icon.png

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

Applies To

  • ContactNow
  • API
  • Do Not Call (DNC)

Procedure(s)

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

Examples

Request

https://api-106.dxi.eu/database.php?token={token}&method=dnc&action=read&format=json

JSON Response

{
    "success": true,
    "total": 1,
    "list": [
        {
            "ddi": "{phone_number}",
            "qid": "{queue_ID}",
            "urn": "{record_URN}",
            "when": "{timestamp_number_placed_in_DNC}"
        }
    ]
}

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>

Additional Information

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. 

The following 8x8 ContactNow API reference material is available to the public. Each link will open a new browser tab: