Retrieving the call detail

The GET v0/{accountKey}/calls/{callGuid} endpoint returns information about an active or completed call. Specify the required call in the query string parameter, callGuid. Use during the call or for up to 24 hours after the call.

In this page


Most URLs in the example code use the following values:

  • ***. To access the API for your region, replace *** with the correct subdomain for your region:
  • a1b2c3d4e5. The value represents the Vonage Contact Center account on which the API request is run. To run the API request on your account data, you must replace a1b2c3d4e5, where used, with your account's API key. For example, if your API key is mtovfiliti3, use mtovfiliti3 in place of a1b2c3d4e5.
  • <ACCESS_TOKEN>. The value represents a bearer access token which you must use to validate every request. Replace <ACCESS_TOKEN> where used with your bearer access token. For information about getting a bearer access token, see Getting a bearer access token.

Header Parameters

This endpoint requires the following headers:

Authorization (required)

This header requires an OAuth bearer token. For information on the bearer token, see How to use your bearer access token.

Accept 

application/json;version=3

Indicates that the client will accept a JSON response and that version 6 of the API should be used.

Request/Response Examples

Get call details for a valid call identifier - where the call failed

curl -X GET "https://***.newvoicemedia.com/v0/a1b2c3d4e5/calls/94e5928c-7f7e-4645-ad72-61010f906449" 
-H "Authorization: Bearer <ACCESS_TOKEN>" 
-H "Accept: application/json; version=3"

Returns HTTP status code of 200, containing the following message.

{
  "id": "94e5928c-7f7e-4645-ad72-61010f906449",
  "links": [
    {
      "href": "https://***.newvoicemedia.com/v0/a1b2c3d4e5/Calls/94e5928c-7f7e-4645-ad72-61010f906449",
      "rel": "_self"
    }
  ],
  "from": {
    "telephoneNumber": "02072068888",
    "agentId": "10"
  },
  "to": {
    "telephoneNumber": "02072068888"
  },
  "status": null,
  "recordingStatus": null,
  "result": {
    "code": "Failure",
    "party": "Originator",
    "reason": "NoAnswer"
  },
  "dispositionCode": "Wrong Number"
}

Get call details for a call with a specified Presented CLID

curl -X GET "https://***.newvoicemedia.com/v0/a1b2c3d4e5/calls/94e5928c-7f7e-4645-ad72-61010f906449" 
-H "Authorization: Bearer <ACCESS_TOKEN>" 
-H "Accept: application/json;version=3"

Returns HTTP Status 200 and the following response:

{
  "id": "94e5928c-7f7e-4645-ad72-61010f906449",
  "links": [
    {
      "href": "https://***.newvoicemedia.com/v0/a1b2c3d4e5/Calls/94e5928c-7f7e-4645-ad72-61010f906449",
      "rel": "_self"
    }
  ],
  "from": {
    "presentedCLID": "08008888888",
    "agentId": "10"
  },
  "to": {
    "telephoneNumber": "02072068888"
  },
  "status": null,
  "recordingStatus": null,
  "dispositionCode": "Sale"
}

Get call details for an invalid call identifier

curl -X GET "https://***.newvoicemedia.com/v0/a1b2c3d4e5/calls/24e5948c-4f4e-6646-cd77-91010f903889" 
-H "Authorization: Bearer <ACCESS_TOKEN>" 
-H "Accept: application/json; version=3"

Returns HTTP status code of 404, containing the following message.

{
 "message": "The requested resource was not found."
}

Possible response parameters:

  • status. Call status. Either "Active" or null if the call is disconnected.
  • recordingStatus. On an active call this can be "Started", "Stopped" or "Paused". This is null on an inactive call.
  • result. Included only when a call fault is recorded. 
    • code. Overall result. "Failure" or "Success".
    • party. Which party in the call raised the result."Originator" if the fault occurred requesting the call. "Recipient" if the destination triggered the fault.
    • reason. Reasons: "CallFailed", "CallRejected", "NoAnswer", "Normal", "NumberBusy", "NumberChanged", "Unknown".
  • dispositionCode. The disposition code set for the call. dispositionCode is null if no disposition code is set.