REST API Detailed Documentation


Canadian Data Centers - Mycontactcenter REST API reference

US Data Centers - Mycontactcenter REST API Web reference



Base URLs


Canada:
https://pop0-apps.mycontactcenter.net/API

USA:
https://pop1-apps.mycontactcenter.net/API




Accessing the API

In order to connect to the API, you'll need a token.  To obtain a token, connect to the following URL:

https://pop0-apps.mycontactcenter.net/api/v1/tokens

Now, please pass the credentials in a JSON request.  The following code should be in the body of your request:


{

  "accountid": "your account",

  "username": "your username",

  "password": "your password"

}


For reference please see the below screenshot.  




Accessing Endpoints

To access the other endpoints, you'll need to pass the token in the header.  The name of the header is "token" - see screenshot below.



As an example, some of the endpoints include:

See "REST API Detailed Documentation" above for the relevant details.



Historical Data and Pagination


When you request historical data that's too lengthy for a single page, the data is paginated.  Each page lists up to 100 records.  You can see in the screenshot below (the request was for Incoming Voice Calls), that the header of the response shows a JSON pagination.

In this case we see {“PageNumber”: 1,”TotalPages”: 88}.  That means we have 88 pages, and this is the first page of the set.



To get all pages, you need to call the API again.  The process is the same: use the same token or a new one, and add the page to the header.

The header name is “Page” and the value is the number of the page you want.  Note that pages are only for historical data such as:





A Note on Dates and Times


When working with the REST API, you may need the date/time format.  Telax uses the following: