Register provider settings

The POST /register endpoint allows you to register a provider and configure how interactions tags with that provider are handled.

In this page


Most URLs in the example code use the following values:

Headers

Header parameters in Requests (Interactions API) apply to this endpoint.

Authorization scopes supported:

ScopeAccess granted
interactions:writeEntire endpoint

Request

Example Request

curl -L -X POST "https://***.api.newvoicemedia.com/interactions/register" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Accept: application/vnd.newvoicemedia.v1+json" \
-H "Content-Type: application/json" \
--data-raw "<JSON BODY>"

Example body

{
    "provider": "TestProviderName",
    "endpoint": "https://endpoint.example.com/routingendpoint",
    "headers":
    {
        "x-header1": "value1",
        "x-header2": "value2"
    },
    "agentactionspermitted":
    {
        "release" : 1,
        "hold" : 1,
        "transferToAgent": 1,
        "transferToRoute": 1
    }
}
  • provider. Required The name of the provider that you are registering. After registering a provider, you can use the name of that provider in the body of a POST /Invoke request (in the provider property) to restrict or allow agent actions on the associated interactions, and, optionally, make requests to the endpoint.

  • endpoint. Optional An https endpoint that will receive notifications made by Vonage Contact Center (VCC). VCC sends notifications after assigning associated interactions to agents, and when those agents release the interactions.

  • headers. Optional Array of key-value pairs. Each pair contains a header name and a header value. This set of headers is included in any POST request from VCC to the provider endpoint.

    If you specify an authorization header, you must specify the header in the following format:
    Authorization: <type> <credentials>
    For example:
    "Authorization": "Basic QWxhZGRpbjpPcGVuU2VzYW1l"
    or
    "Authorization": "Bearer 24d80e703a037349cb4818cf7ec695cc"

  • agentactionspermitted. Required Array of key-value pairs. Each pair contains an operation name (key) and a 0 or 1 (value). 0 indicates that the operation is not allowed and 1 indicates that the operation is allowed. Currently the only supported operations are release, hold, transferToAgent and transferToRoute. Agents can only perform the allowed operations on interactions associated with the provider.
    • The release operation enables an agent to end an interaction.
    • The hold operation enables an agent to put a caller on hold (in the case of a live interaction) or park a nonlive interaction.
    • The hold operation enables the retrieve operation by inference.
    • The transferToAgent and transferToRoute operations enable an agent to transfer the interaction to an agent or route respectively.
    • Unless specified, all operations—other than the release operation—are not allowed.

Registering a provider and allowing release

{
    "provider": "TestProviderName",
    "agentactionspermitted":
    {
        "release" : 1
    }
}

Registering a provider with a callback endpoint

{
    "provider": "TestProviderName",
    "endpoint": "https://endpoint.example.com/routingendpoint",
    "headers":
    {
        "Authorization": "Basic <token>"
    }
}

Registering a provider without a callback endpoint

{
    "provider": "TestProviderName",
    "agentactionspermitted":
    {
        "release" : 1,
        "hold" : 1,
        "transferToAgent": 1,
        "transferToRoute": 1
    }
}

Callbacks

Providers registered will receive the following API callbacks.

Interaction assigned to Agent

[
  {
    "notification": "AssignToAgent",
    "objectid": "88381694",
    "notificationid": "d8016173-f069-4fa4-ac3e-2a4a1bae6ea8",
    "params": {
      "AccountName": "InsightsDemoEMEA",
      "Agent": "InsightsAgentEMEA",
      "AgentId": "5464"
    }
  }
]

Interaction released from the VCC Platform

[
  {
    "notification": "Release",
    "objectid": "88381694",
    "notificationid": "309eb0a5-6647-4b5c-9bf7-54a2b9a82768",
    "params": {
      "AccountName": "InsightsDemoEMEA"
    }
  }
]
  • Notification. The key indicating what action has been performed, the value is either AssignToAgent or Release.
  • objectid. Matching the externalId from the Create inbound interaction request body, this identifies the interaction.
  • notificationid. A generated unique notification ID.
  • params.
    • AccountName. The name of the VCC account where the notification occurred.
    • Agent. When assigned to the agent, this indicates the username of the agent assigned to the interaction.
    • AgentId. When assigned to the agent, this indicates the display ID of the agent assigned the interaction.


Try it out

  

For information, see Trying out Vonage Contact Center APIs.