$customHeader
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This resource allows manipulation of call recording for a call currently in progress; use the resource to either pause or resume a recording during the call. You control recording of the call that you specify in the query string parameter, callGuid. For information about getting GUID for the current call, see Getting agent details.

Request Scheme

HTTPS

Request Uri

POST v{v#}/{accountKey}/calls/{callGuid}

Request Headers

Authorization (required)

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

Content-Type (required)

application/json

Indicates that the media type sent by the client is JavaScript Object Notation (JSON).

application/xml

Indicates that the media type sent by the client is Extensible Markup Language (XML).

Examples


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.

Pause call recording for call 94e5928c-7f7e-4645-ad72-61010f906449

curl -X POST "https://***.newvoicemedia.com/v1/a1b2c3d4e5/calls/94e5928c-7f7e-4645-ad72-61010f906449" -d '{ "recordingStatus": "Paused" }' -H "Authorization: Bearer <ACCESS_TOKEN>" -H "Content-Type: application/json"

Resume call recording for call 94e5928c-7f7e-4645-ad72-61010f906449

curl -X POST "https://***.newvoicemedia.com/v1/a1b2c3d4e5/calls/94e5928c-7f7e-4645-ad72-61010f906449" -d '{ "recordingStatus": "Started" }' -H "Authorization: Bearer <ACCESS_TOKEN>" -H "Content-Type: application/json"

Successful calls return HTTP status code of 200, containing the following message and headers.

Example: Successful response

Returns HTTP Status Code 202 Accepted.

The controlling of the call is carried out asynchronously - To check that the status has been correctly updated continue to call GET requests against that call.

{
"recordingStatus": "Paused"
}

Example: Invalid request data

Returns HTTP Status Code 400.

  • Invalid blank recordingStatus
  • Invalid recordingStatus: valid values "Paused", "Started"
  • Only calls currently with an agent can be paused or started.
{
  "message": "The request is invalid."
}

Example: Unknown call specified

Returns HTTP Status Code 404.

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

PDF version

  • No labels