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 »

Version headers are mandatory for all Stats API requests.

Specify the version of the API in the accept header parameter using the RFC 2616 protocol.

For example, to use version 3 of the API, set the accept header parameter to application/vnd.newvoicemedia.v3+json:

Accept: application/vnd.newvoicemedia.v3+json 

If you do not include a version, you will receive the following error:

HTTP/1.1 400
Content-Length: 35
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Invalid Accept header!"
}

If you specify an invalid version, you will receive the following error:

HTTP/1.1 400
Content-Length: 89
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Invalid api-version! Valid values: 2,3"
}
  • No labels