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 3 Next »

Request parameters

Header parameters

All Interactions API requests require the following header parameters:

accept

Required The accept header describes the content types that the response can return. The content-type of the Interactions API’s responses is always JSON format so you must set the accept header to accept JSON. You must also specify the version of the API you are using. For information about specifying the version, see Versioning for more information.

Example application/vnd.newvoicemedia.v1+json

authorization

Required To make a request to the Interactions API, you must provide your bearer access token in the authorization header.

You can obtain a bearer access token from the Authentication API. For information about getting and using your bearer access token, see How to authenticate with a Vonage Contact Center API.

Example bearer 24d80e703a037349cb4818cf7ec695cc

content-type

Required The content-type header parameter must contain a string that represents type of the content you are sending in the body of the request.

Example application/json

Max request size

Requests are limited to 100KB. If your request exceeds 100KB, the response contains either:

  • a HTTP/1.1 413 status code with the following message:
{
    "message":"Payload Too Large"
}

or

  • a HTTP/1.1 417 status code with the following message:
{
   "message":"Request size limit exceeded"
}

Example request

$ curl -X POST -H "Accept: application/vnd.newvoicemedia.v1+json" -H "Authorization: bearer 24d80e703a037349cb4818cf7ec695cc" -d '{
  "provider": "CrmIntegration",
  "requests":
  [
      {
          "action": "dispatch",
          "requestid": "8762187187",
          "externalid": "ObjectId_001",
          "route": "CrmCallRouting",
          "linkeddata":
          [
              {"type": "clid", "value": "+44123456789"},
              {"type": "url", "label": "Click me", "value": "http://foo.bar.com"},
              {"type": "object", "owner":"Crm", "key":"Contact", "value": "500ea8787a87s87s"}
          ],
          "routingdata":
          {
              "interactiontype" : "nonlive"
          }
      }
  ]
}
' "https://***.api.newvoicemedia.com/interactions/Invoke"
HTTP/1.1 100 Continue
  • No labels