Overview

The Detailed Call Records webhook lets you have greater visibility into your customers Webex Calling activity for various purposes, from billing to custom-tailored reporting. You can use this webhook to gather records conveniently for all your customers without having to query records for each customer one by one. This webhook allows you to develop custom reporting and analytic applications for both internal business purposes or the provision of value-added services to customers. For an introduction to the webhook and its accompanying APIs, you can watch this vidcast.

The webhook delivers records every 5 minutes. Each webhook payload contains records for calls that ended between 10 and 5 minutes ago. For example, a payload received at 17:00 includes calls that ended between 16:50 and 16:55. Calls ending between 16:55 and 17:00 will be in the 17:05 payload.

Webex Calling records are delivered using the same format as the existing Detailed Call Records APIs. You can set up a webhook and choose between two types of feed:

  • Analytics—Includes all call records for all customer organizations that the partner has a Webex Calling relationship with. This includes organizations for which:
    • The partner manages the customer organization with a Partner Full Administrator role.
    • The customer organization has an active Webex Calling subscription within the partner organization.
  • Billing—Only includes call records for calls made by users with a Webex Calling license sold by the partner. Call records for Workspaces are included in this feed.

Set up a webhook callback URL

Configure the webhook in the Partner Hub. You can only set up one webhook per partner organization. You must be a full administrator to set up a webhook.

1

Sign in to Partner Hub.

2

Go to Organization Settings > Call Detail Records.

3

Enter a URL to use under Webhook.

4

If you'd like to authenticate your webhook payloads with a secret token, you can add one. You can find more information about Webex webhooks and secret tokens here.

5

Select one of the following Resource type to use for the webhook:

  • Analytics—Includes all call records for all customer organizations that the partner has a Webex Calling relationship with.
  • Billing—Only includes call records that the partner sold Webex Calling licenses to. This feed includes call records for Workspaces.
Call detailed records webhook setup in Partner Hub

API endpoints

We provide two API endpoints along with the webhook to help with data reconciliation. These endpoints allow you to "catch up" or reconcile your data stores with missing records that aren’t received by the webhook listener. These two APIs are the Reconciliation API endpoint and the Records API endpoint.

Records are available from these APIs for 48 hours. We recommend reconciling record stores periodically, such as every 12 or 24 hours, so that all records are received as expected. A partner access token is required to use this API. You can obtain a partner access token and manage it as per the standard Webex Developer access token management principles.

Reconciliation API endpoint

The reconciliation API endpoint returns the number of records generated by each customer that is managed by the partner in the specified time period. If a partner manages more than 200 customer organizations, results from the API will be paginated for better readability. You can use these totals to check against your local storage if any records are missing for specific customers. You can find the reconciliation API endpoint URL here:

https://analytics.webexapis.com/v1/partners/cdrcountbyorg?endTime=YYYY-MM-DDTHH:MM:SS.000Z&startTime=YYYY-MM-DDTHH:MM:SS.000Z

Parameters

The reconciliation API can only be called for a maximum duration of 1 hour, with the startTime and endTime parameters no more than 60 minutes apart. The API can be used for any 1-hour period between 5 minutes and 48 hours ago, but to manage service load, only 1 hour can be called at a time.

The parameters available are:

  • startTime (string)—Time of the first report you want to collect. The report time specifies the call completion time.

    You must format the time as YYYY-MM-DDTHH:MM:SS.mmmZ.

  • endTime (string)—Time of the last report you want to collect. The report time specifies the call completion time.

    The specified time should be later than startTime but no later than 48 hours, and you must format the time as YYYY-MM-DDTHH:MM:SS.mmmZ.

Here's an example of what a Reconciliation API endpoint JSON return payload looks like:

{
  "cdr_counts": [
    {
      "orgId": "zzzzzzzz-yyyy-zzzz-xxxx-yyyyyyyyyyyy",
      "count": 3009
    },
    {
      "orgId": "yyyyyyyy-yyyy-zzzz-xxxx-yyyyyyyyyyyy",
      "count": 129
    },
    {
      "orgId": "xxxxxxxx-yyyy-zzzz-xxxx-yyyyyyyyyyyy",
      "count": 278
    }
  ]
} 

The headers of the API response indicate the total number of organizations returned and if there are extra pages. Check the following parameters to make sure all pages have been queried.


num-pages = 2
total-orgs = 283
current-page = 1

The above parameters show that the current page is the first page, that there are 2 total pages, and that the entire response contains 283 organizations. Access the second page by adding the parameter page=2 to the GET request, as shown below.

https://analytics.webexapis.com/v1/partners/cdrcountbyorg?endTime=YYYY-MM-DDTHH:MM:SS.000Z&startTime=YYYY-MM-DDTHH:MM:SS.000Z&page=2

Records API endpoint

This API endpoint returns call records in JSON format, identical to the format as described in the Detailed Call History API. The returned payload contains identical fields to the Detailed Call History returned payload. You can find more details on the values in each field returned here. The records API endpoint is used to query missing records for organizations for whom records are missing. You can find the records API endpoint URL here:

https://analytics.webexapis.com/v1/partners/cdrsbyorg?orgId=zzzzzzzz-yyyy-zzzz-xxxx-yyyyyyyyyyyy&endTime=YYYY-MM-DDTHH:MM:SS.000Z&startTime=YYYY-MM-DDTHH:MM:SS.000Z

Parameters

  • orgID—The organization ID you want to query records for. You can open these identifiers from the preceding reconciliation endpoint.

  • startTime (string)—Time of the first report you want to collect. The report time specifies the call completion time.

    The specified time must be between 5 minutes ago and 48 hours ago, and you must format the time as YYYY-MM-DDTHH:MM:SS.mmmZ.

  • endTime (string)—Time of the last report you want to collect. The report time specifies the call completion time.

    The specified time should be later than startTime but no later than 48 hours, and you must format the time as YYYY-MM-DDTHH:MM:SS.mmmZ.