The POST /register
endpoint allows you to register a provider and configure how interactions tags with that provider are handled.
Header parameters in Requests (Interactions API) apply to this endpoint.
Authorization scopes supported:
Scope | Access granted |
---|---|
interactions:write | Entire endpoint |
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>" |
{ "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: |
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.{ "provider": "TestProviderName", "agentactionspermitted": { "release" : 1 } } |
{ "provider": "TestProviderName", "endpoint": "https://endpoint.example.com/routingendpoint", "headers": { "Authorization": "Basic <token>" } } |
{ "provider": "TestProviderName", "agentactionspermitted": { "release" : 1, "hold" : 1, "transferToAgent": 1, "transferToRoute": 1 } } |
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.