Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Version headers are mandatory for all User Admin API requests.

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

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

Code Block
languagejs
themeMidnight
Accept: application/vnd.newvoicemedia.v4+json

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

Code Block
languagejs
themeMidnight
HTTP/1.1 400
Content-Length: 35
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Version missing from Accept header!"
}

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

Code Block
languagejs
themeMidnight
HTTP/1.1 400
Content-Length: 89
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Invalid api-version! Valid values: 4"
}