Insights

The Insights service exposes all the sessions information for an account and can be queried and aggregated in a dynamic way

Are you using postman?

When using curly braces in the query parameters, make sure you encode the content of your curly braces. If sent without the encoding, your request will return empty.

Endpoints

Search Session - Requires API Key

Any request to this endpoint must contain X-Vgai-Key header with a valid API key. Please make sure not to add any spaces after or within the endpoint.

Endpoint - https://studio-api-<REGION>.ai.vonage.com/insights/sessions

For <REGION> please fill in the region of your agent, which will be either EU or US.

Method: GET

This is a flexible, low-level endpoint that allows you to provide ElasticSearch syntax requests to get fine-grained results.

Parameters:

  • from_date - isoformatted datetime, presents the start of the search range

  • to_date - isoformatted datetime, presents the end of the search range

    • Note, the system only supports date ranges up to 60 days apart

  • page_number - int - pagination page number (starts from 0)

  • page_size - int - pagination page size

  • sort_by - array of strings - a comma-separated list of <document attribute>:<asc/desc>. Any attributes in the document are valid here.

    • Example uses: "session_start_time:desc,agent_information.id:asc"

      • sort by session start time descending order, agent id ascending order after that

  • project_fields - string - a string list of the fields to retrieve from the document.

    • Example uses: ["session_start_time","source","destination","agent_id","channel_data.duration","id"]

      • Only get the following fields from the document:

        • session_start_time

        • source

        • destination

        • agent_id

        • channel_data.duration

        • id

  • filter_by - dictionary - a dictionary containing elasticsearch boolean query components.

    • This dictionary can contain the following three keys, whose value will be explained below:

      • must

        • All the search patterns in the "must" array must be present in the returned document.

      • must_not

        • All the search patterns in the "must_not" array must not be present in the returned document.

      • should

        • A document must contain at least one value in the "should" array, if it has no value in the "should" array, it will not match.

    • Each of these keys is a list of dictionaries. Each dictionary contains a query component that looks like this:

      • {"term": {"request_ids": "12345"}}

        • This tells elasticsearch to do an exact match on request_ids and only return documents that have a value in request_ids that's equal to "12345"

      • {"match": {"transcription.client": "i love this agent!"}}

        • This tells elasticsearch to do a match search on all documents in order to find all the documents in which the client has at one point said something in the spirit of "I love this agent".

      • It's important to remember the distinction between term and match.

        • Term searches perform an exact comparison, and so they're useful for searching ids, dates, and numbers.

        • Match searches perform a search engine style search that look for a match in the value like a search engine would do, rather than an exact 1-1 match. This is useful for scanning conversations.

      • Any ID field can only be searched using term searches, match searches will not work. The following fields are considered ID fields:

api_key

The agent's nexmo api key (not yet implemented)

id

Session ID

source

Caller phone number

destination

Agent phone number

account_id

channel

Telephony/ Whatsapp/ http

agent_information.id

Agent ID

agent_information.version_id

Published Version

agent_information.name

Agent Name

agent_information.voice

Voice name

agent_information.language

Agent Language

flow_data.collected_tags.tag

Collected tags during the call, can have duplication in case the same tag was collected multiple times

flow_data.collected_tags.category

flow_data.collected_parameters.name

Collected parameters, can have duplication in case the same parameter was collected multiple times

flow_data.collected_parameters.type

Entity type

flow_data.collected_parameters.audio_url

Recording URL

flow_path.node_id

flow_path.request_id

Request ID made by the node

flow_path.type

Node type

flow_path.tags.tag

Tags collected by the node

flow_path.tags.category

Tag category collected by the node

flow_path.context.execution_parameters.name

Parameter information

flow_path.context.execution_parameters.type

Parameter information

flow_path.context.execution_parameters.audio_url

Parameter information

flow_path.context.url

If the node send a webhook request to another URL, this is that URL

flow_path.request.payload

The payload sent to the webhook

flow_path.request.url

Same URL as above

flow_path.request.headers

Headers sent to the URL

flow_path.request.verb

POST/GET/UPDATE etc

flow_path.response.payload

Response provided by the API

tags_list.tag

Tags collected by session, no duplication here, one entry per tag

tags_list.category

Tag Category

tags_list.count

Amount of times the tag was collected

params_list.name

Paramters collected by the session, no duplication here, only the last value is set per parameter

params_list.type

params_list.value

params_list.audio_url

Recording url of the parameter

flow_path.context.altered_parameters.alteration_source

What caused this parameter's value to change? It can be injected/completed/classified

flow_path.context.altered_parameters.audio_duration

flow_path.context.altered_parameters.audio_url

flow_path.context.altered_parameters.entity

flow_path.context.altered_parameters.name

flow_path.context.altered_parameters.value

flow_path.context.altered_parameters.value_text

channel_data.audio_url

Recording URL for the call

channel_data.call_status

The call's status (in_progress/ended)

channel_data.duration

Call's duration (in milliseconds)

channel_data.status_code

The call's status in terms of if it had errors or not. 0 = successful, 100 = warning, 200 = erroneous

parameters.<parameter_name>

A way to get the parameter's last set value in a nicer way

tags.<tag_name>

A way to get the tag's amount of times collected

status

Presents the call status - particularly useful for sessions that only started innit but there was no conversation.

session_end_time

The Ending Date and time of the session.

Parameter usage examples

Find all calls from agent id 1234567, in which the client has said at one point "shut up"

{
    "must": [
    {"term": {"agent_information.id": "1234567"}},
    {"match": {"transcription.client": "shut up"}}
    ]
}

Find all calls that were tagged as tag "cat", "dog" and "rat"

{
    "must": [
    {"term": {"flow_data.collected_tags.tag": "cat"}},
    {"term": {"flow_data.collected_tags.tag": "dog"}},
    {"term": {"flow_data.collected_tags.tag": "rat"}}
    ]
}

Find all the calls from phone number "9726666666" that had either request id "22" or request id "44"

{
    "must": [
    {"term": {"source": "9726666666"}}
    ],
    "should": [
    {"term": {"request_ids": "22"}},
    {"term": {"request_ids": "44"}}
    ]
}

Find all the calls except for calls that were tagged as "invalid"

{
    "must_not": [
    {"term": {"flow_data.collected_tags.tag": "invalid"}}
    ]
}

Sort By

Sort by the call time, in descending order

session_start_time:desc

Sort by agent name ascending order, status descending order

agent_information:asc,status:desc

Project Field

Retrieve only the agent information fields and the flow_data fields (This will return all the contents of these fields, so all the agent information and all the flow data)

["agent_information","flow_data"]

Retrieve the agent name, all the collected tags, and status

["agent_information.name","flow_data.collected_tags","status"]

Example queries

Get the first 100 agent queries, whose status has ended, sorted by session_start_time descending, that were made between the 15th and 17th of September

https://studio-api-<REGION>.ai.vonage.com/insights/sessions?from_date=2020-09-15&to_date=2020-09-17&page_number=0&page_size=100&sort_by=session_start_time:desc&filter_by={"must": [{"term": {"status":"ended"}}]}&project_fields=["agent_information"]

Get results 30-40 of all calls that happened on the 20th August 2020

https://stairway.ai.vonage.com/insights/sessions?from_date=2020-08-20&to_date=2020-08-20&page_number=3&page_size=10

General call logs:

from_date = <isoformatted from date>
to_date = <isoformatted to date>
page_size = <page size>
page_number = <page number> // starts from 0
project_fields = ["session_start_time", "agent_id", "source", "channel_data.duration"]

Call logs for one or more agents:

from_date = <isoformatted from date>
to_date = <isoformatted to date>
page_size = <page size>
page_number = <page number>
project_fields = ["session_start_time", "agent_id", "source", "channel_data.duration"]
filter_by = {"should" [
{"term": {"agent_id": "<agent_id_1>"}},
{"term": {"agent_id": "<agent_id_2>"}}
]}

Call logs for one or more agents, sorted by the longest call duration:

from_date = <isoformatted from date>
to_date = <isoformatted to date>
page_size = <page size>
page_number = <page number>
project_fields = ["session_start_time", "agent_id", "source", "channel_data.duration"]
sort_by = "channel_data.duration:desc"
filter_by = {"should" [
{"term": {"agent_id": "<agent_id_1>"}},
{"term": {"agent_id": "<agent_id_2>"}}
]}

Get Session - Requires API Key

Any request to this endpoint must contain X-Vgai-Key header with a valid API key. Please make sure not to add any spaces after or within the endpoint.

Endpoint - https://studio-api-<REGION>.ai.vonage.com/insights/sessions/{session-id}/parameters

For <REGION> please fill in the region of your agent, which will be either EU or US.

Method: GET

Tries to retrieve a conversation from the database. If the session id does not exist in the provided date this query will fail.

Parameters:

  • session_start_time: isoformatted datetime string denoting when the session started.

    • Example: 2021-01-15T08:09:43.377776

    • Note: This does not have to be precise, if you know the day in which the session occurred, you can use that day, i.e. 2021-01-15

Search Session - Requires API Key

Any request to this endpoint must contain X-Vgai-Key header with a valid API key. Please make sure not to add any spaces after or within the endpoint.

Endpoint - https://studio-api-<REGION>.ai.vonage.com/insights/sessions/search/{session_id}

For <REGION> please fill in the region of your agent, which will be either EU or US.

Method: GET

Searches for the provided session ID in a wide range of dates. Please note that the nature of this query is much slower than the standard get session provided above, so only use it if you are unsure when the session took place.

Delete Session - Requires API Key

Any request to this endpoint must contain X-Vgai-Key header with a valid API key

Endpoint - https://studio-api-<REGION>.ai.vonage.com/insights/sessions/{session_id}

For <REGION> please fill in the region of your agent, which will be either EU or US.

Method: DELETE

Tries to delete a conversation from the database. If the session id does not exist in the provided date this query will fail.

Parameters:

  • session_start_time: isoformatted datetime string denoting when the session started.

    • Example: 2021-01-15T08:09:43.377776

    • Note: This does not have to be precise, if you know the day in which the session occurred, you can use that day, i.e. 2021-01-15

Expected Errors:

401 Errors in case invalid parameters are provided (such as invalid date ranges, invalid filters, etc)

404 Errors in case searching for a specific session yields no result

Models

Below is an example model of our insights conversation model. Each conversation will have one such model. Every conversation has a flow path, which is composed of one or more flow steps, each step being a node execution in the agent.

All the fields that are marked with a <> are queryable. If they are wrapped with a “ ” then that means that the field is a string field, otherwise, it’s a number or a boolean.

{
  "flow_path" : [
    {
      "synchronized" : <true/false>,
      "request" : {
        "headers" : """<request_headers>""",
        "payload" : """<request_payload>""",
        "verb" : "<request_verb>",
        "url" : "<webhook_url>"
      },
      "response" : {
        "code" : <status_code>,
        "payload" : """<response_message>"""
      },
      "context" : {
        "output" : null,
        "user_input" : "",
        "execution_parameters" : [
          {
            "value_text" : "",
            "name" : "<execution_param_1_name>",
            "completed" : <true/false>,
            "value" : "<execution_param_1_name>",
            "entity" : "<execution_param_1_entity>"
          },
          {
            "value_text" : "",
            "name" : "<execution_param_2_name>",
            "completed" : true/false,
            "value" : "<execution_param_2_name>",
            "entity" : "<execution_param_2_entity>"
          },
          {
            "value_text" : "",
            "name" : "<execution_param_3_name>",
            "completed" : true/false,
            "value" : "<execution_param_3_name>",
            "entity" : "<execution_param_3_entity>"
          },
          {
            "value_text" : "<textual_value>",
            "name" : "<param_1_name>",
            "completed" : true/false,
            "value" : "<param_1_value>",
            "entity" : "<param_1_entity>"
          }
        ],
        "url" : "webhook_url",
        "status" : {
          "code" : <response_code>,
          "message" : """<response_message>"""
        }
      },
      "type" : "webhook",
      "request_id" : "<request_id>",
      "node_id" : "<internal_node_id>",
      "tags" : [ ],
      "execution_time" : <execution_time>
    },
    {
      "synchronized" : <true/false>,
      "request" : {
        "headers" : "<headers>",
        "payload" : "<payload>",
        "verb" : "<verb>",
        "url" : "<url>"
      },
      "response" : {
        "code" : <response_code>,
        "payload" : "<response_payload>"
      },
      "context" : {
        "output" : <output>,
        "user_input" : "<user_input>",
        "execution_parameters" : [
          {
            "value_text" : "<execution_param_1_value_text>",
            "name" : "<execution_param_1_name>",
            "completed" : <true/false>,
            "value" : "<execution_param_1_name>",
            "entity" : "<execution_param_1_entity>"
          },
          {
            "value_text" : "<execution_param_2_value_text>",
            "name" : "<execution_param_2_name>",
            "completed" : <true/false>,
            "value" : "<execution_param_2_name>",
            "entity" : "<execution_param_2_entity>"
          },
          {
            "value_text" : "<execution_param_3_value_text>",
            "name" : "<execution_param_3_name>",
            "completed" : <true/false>,
            "value" : "<execution_param_3_name>",
            "entity" : "<execution_param_3_entity>"
          },
          {
            "value_text" : "<textual_value>",
            "name" : "<param_1_name>",
            "completed" : <true/false>,
            "value" : "<param_1_value>",
            "entity" : "<param_1_entity>"
          }
        ],
        "url" : "",
        "status" : {
          "code" : <status_code>,
          "message" : "<message>"
        }
      },
      "type" : "<node_type>",
      "request_id" : "<request_id>",
      "node_id" : "<internal_node_id>",
      "tags" : [ ],
      "execution_time" : 0
    }
  ],
  "transcription" : [
    {
      "user" : "<user_statement>"
    },
    {
      "<agent_id>": "<agent_statement>"
    }
  ],
  "tags_list" : [
    {
      "count" : 1,
      "tag" : "<tag_1>",
      "category" : "<tag_category_1>"
    },
    {
      "count" : 1,
      "tag" : "<tag_2>",
      "category" : "<tag_category_2>"
    },
    {
      "count" : 1,
      "tag" : "<tag_3>",
      "category" : "<tag_category_2>"
    }
  ],
  "channel_data" : {
    "call_status" : "in_progress/ended"
  },
  "params_list" : [
    {
        "value_text" : "<textual_value>",
        "name" : "<param_1_name>",
        "completed" : <true/false>,
        "value" : "<param_1_value>",
        "entity" : "<param_1_entity>"
    }
  ],
  "destination" : <agent_phone_number>,
  "channel" : "<telephony/whatsapp>",
  "session_start_time" : "<session time in isoformat>,
  "language" : "en-US",
  "flow_data" : {
    "injected_parameters" : [ ],
    "collected_tags" : [
      {
        "tag" : "<tag_1>",
        "category" : "<tag_category_1>"
      },
      {
        "tag" : "<tag_2>",
        "category" : "<tag_category_2>"
      },
      {
        "tag" : "<tag_3>",
        "category" : "<tag_category_2>"
      }
    ],
    "collected_parameters" : [
      {
        "value_text" : "<textual_value>",
        "name" : "<param_1_name>",
        "completed" : <true/false>,
        "value" : "<param_1_value>",
        "entity" : "<param_1_entity>"
      }
    ]
  },
  "source" : "<caller_phone_number>",
  "params" : {
    "<param_1_name>" : {
      "completed" : <true/false>,
      "value" : "<param_1_value>"
    }
  },
  "tags" : {
    "<tag_category_1>" : {
      "<tag_1>" : tag_1_count
    },
    "<tag_category_2>" : {
      "<tag_2>" : tag_2_count
    },
    "<tag_category_2>" : {
      "<tag_2>" : tag_2_count,
      "<tag_3>" : tag_3_count
    }
  },
  "account_id" : "<account_id>",
  "api_key" : "N/A",
  "request_ids" : [
    "<request_id_1>",
    "<request_id_2>"
  ],
  "id" : "<session_id>",
  "agent_information" : {
    "voice" : "<voice>",
    "name" : "<name>",
    "language" : "<language>",
    "version_id" : "<version_id>",
    "id" : "<agent_id>",
  },
  "status" : "<in_progress/ended>"
}

Example Output Document

Get All Result

{
  "total": 1, // The total number of results available
  "hits": [ // An array of results
    {
      "transcription": [
        {
          "5f7f2f337340dc7249f81406": "sup?"
        },
        {
          "5f7f2f337340dc7249f81406": "name?"
        },
        {
          "user": "Benjamin"
        },
        {
          "5f7f2f337340dc7249f81406": "shut up Benjamin"
        }
      ],
      "account_id": "5f7f277cf090a7001116fabe",
      "api_key": "N/A",
      "status": "ended",
      "id": "8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36",
      "language": "en-US",
      "tags": {
        "ddbc05ccbc48431d898104ac5e5b561a": {
          "two": 1,
          "one": 1,
          "three": 2
        }
      },
      "params": {
        "name": {
          "completed": true,
          "value": "Benjamin"
        }
      },
      "tags_list": [
        {
          "count": 1,
          "tag": "two",
          "category": "ddbc05ccbc48431d898104ac5e5b561a"
        },
        {
          "count": 1,
          "tag": "one",
          "category": "ddbc05ccbc48431d898104ac5e5b561a"
        },
        {
          "count": 2,
          "tag": "three",
          "category": "ddbc05ccbc48431d898104ac5e5b561a"
        }
      ],
      "params_list": [
        {
          "value_text": "Benjamin",
          "name": "name",
          "completed": true,
          "type": "sys.names",
          "value": "Benjamin"
        }
      ],
      "agent_information": {
        "version_id": "5f7f2f337340dc7249f81406",
        "id": "5f7f2e60a6034c9b5c79d16c",
        "name": "oriprod2",
        "voice": "Salli",
        "language": "en-US"
      },
      "source": "9720014044002502",
      "destination": "972523656841",
      "channel": "voice",
      "session_start_time": "2020-10-08T17:09:27.758983",
      "request_ids": [
        "759a8938-c296-4ff5-9ec9-d3f0267893f9",
        "db2a0259-92fa-4067-a50c-728689276c58"
      ],
      "channel_data": {
        "duration": 27000,
        "audio_url": "5f7f277cf090a7001116fabe/5f7f2f337340dc7249f81406/8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36.mp3",
        "call_status": "ended",
        "status_code": 200
      },
      "flow_data": {
        "collected_tags": [
          {
            "tag": "two",
            "category": "ddbc05ccbc48431d898104ac5e5b561a"
          },
          {
            "tag": "one",
            "category": "ddbc05ccbc48431d898104ac5e5b561a"
          },
          {
            "tag": "three",
            "category": "ddbc05ccbc48431d898104ac5e5b561a"
          },
          {
            "tag": "three",
            "category": "ddbc05ccbc48431d898104ac5e5b561a"
          }
        ],
        "collected_parameters": [
          {
            "value_text": "Benjamin",
            "name": "name",
            "completed": true,
            "type": "sys.names",
            "value": "Benjamin"
          }
        ],
        "injected_parameters": []
      },
      "flow_path": [
        {
          "node_id": "5f7f2e60a6034c9b5c79d16b",
          "type": "start",
          "context": {
            "execution_parameters": [
              {
                "name": "name",
                "type": "sys.names",
                "value": "",
                "value_text": "",
                "completed": false
              }
            ],
            "status": {
              "code": 200,
              "message": ""
            },
            "output": null,
            "user_input": "",
            "url": ""
          },
          "tags": [],
          "execution_time": 0,
          "synchronized": true,
          "request_id": "759a8938-c296-4ff5-9ec9-d3f0267893f9",
          "request": {
            "payload": "",
            "headers": "",
            "verb": "POST",
            "url": ""
          },
          "response": {
            "payload": "",
            "code": 200
          }
        },
        {
          "synchronized": true,
          "request": {
            "headers": "{\"Content-Type\": \"application/json\"}",
            "payload": "{\"session_id\": \"8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\", \"action_id\": \"5f7f2e689ce1d4ecd57793c5\", \"is_collect_input\": false, \"type\": \"speak\", \"text\": \"sup?\", \"audio\": null, \"voice_id\": \"Salli\", \"language_code\": \"en-US\"}",
            "verb": "POST",
            "url": "http://telephony-connector.ai.vonage.com/api/actions/speak"
          },
          "response": {
            "code": 201,
            "payload": "{\"message\": \"Succesfully registered SPEAK action for session_id: 8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\"}"
          },
          "context": {
            "output": null,
            "user_input": "",
            "execution_parameters": [
              {
                "value_text": "",
                "name": "name",
                "completed": false,
                "type": "sys.names",
                "value": ""
              }
            ],
            "url": "http://telephony-connector.ai.vonage.com/api/actions/speak",
            "status": {
              "code": 201,
              "message": "{\"message\": \"Succesfully registered SPEAK action for session_id: 8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\"}"
            }
          },
          "type": "speak",
          "request_id": "759a8938-c296-4ff5-9ec9-d3f0267893f9",
          "node_id": "5f7f2e689ce1d4ecd57793c5",
          "tags": [
            {
              "tag": "two",
              "category": "ddbc05ccbc48431d898104ac5e5b561a"
            }
          ],
          "execution_time": 168
        },
        {
          "synchronized": true,
          "request": {
            "headers": "{\"Content-Type\": \"application/json\"}",
            "payload": "{\"session_id\": \"8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\", \"action_id\": \"7f99f590-437d-4e50-b985-196d419da71e\", \"is_collect_input\": true, \"type\": \"speak\", \"text\": \"name?\", \"audio\": null, \"voice_id\": \"Salli\", \"language_code\": \"en-US\"}",
            "verb": "POST",
            "url": "http://telephony-connector.ai.vonage.com/api/actions/speak"
          },
          "response": {
            "code": 201,
            "payload": "{\"message\": \"Succesfully registered SPEAK action for session_id: 8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\"}"
          },
          "context": {
            "output": null,
            "user_input": "",
            "execution_parameters": [
              {
                "value_text": "",
                "name": "name",
                "completed": false,
                "type": "sys.names",
                "value": ""
              }
            ],
            "url": "http://telephony-connector.ai.vonage.com/api/actions/speak",
            "status": {
              "code": 201,
              "message": "{\"message\": \"Succesfully registered SPEAK action for session_id: 8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\"}"
            }
          },
          "type": "speak",
          "request_id": "759a8938-c296-4ff5-9ec9-d3f0267893f9",
          "node_id": "7f99f590-437d-4e50-b985-196d419da71e",
          "tags": [],
          "execution_time": 4777
        },
        {
          "synchronized": true,
          "request": {
            "headers": "",
            "payload": "",
            "verb": "POST",
            "url": ""
          },
          "response": {
            "code": 200,
            "payload": ""
          },
          "context": {
            "output": null,
            "user_input": "Benjamin",
            "execution_parameters": [
              {
                "value_text": "Benjamin",
                "name": "name",
                "completed": true,
                "type": "sys.names",
                "value": "Benjamin"
              }
            ],
            "url": "",
            "status": {
              "code": 200,
              "message": ""
            }
          },
          "type": "param_completion",
          "request_id": "db2a0259-92fa-4067-a50c-728689276c58",
          "node_id": "5f7f2e6f7340dc7249f813fa",
          "tags": [
            {
              "tag": "one",
              "category": "ddbc05ccbc48431d898104ac5e5b561a"
            }
          ],
          "execution_time": 53
        },
        {
          "synchronized": true,
          "request": {
            "headers": "{\"Content-Type\": \"application/json\"}",
            "payload": "{\"session_id\": \"8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\", \"action_id\": \"5f7f2eca35e7e1a6c42754e9\", \"is_collect_input\": false, \"type\": \"speak\", \"text\": \"shut up Benjamin\", \"audio\": null, \"voice_id\": \"Salli\", \"language_code\": \"en-US\"}",
            "verb": "POST",
            "url": "http://telephony-connector.ai.vonage.com/api/actions/speak"
          },
          "response": {
            "code": 201,
            "payload": "{\"message\": \"Successfully registered SPEAK action for session_id: 8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\"}"
          },
          "context": {
            "output": null,
            "user_input": "",
            "execution_parameters": [
              {
                "value_text": "Benjamin",
                "name": "name",
                "completed": true,
                "type": "sys.names",
                "value": "Benjamin"
              }
            ],
            "url": "http://telephony-connector.ai.vonage.com/api/actions/speak",
            "status": {
              "code": 201,
              "message": "{\"message\": \"Successfully registered SPEAK action for session_id: 8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36\"}"
            }
          },
          "type": "speak",
          "request_id": "db2a0259-92fa-4067-a50c-728689276c58",
          "node_id": "5f7f2eca35e7e1a6c42754e9",
          "tags": [
            {
              "tag": "three",
              "category": "ddbc05ccbc48431d898104ac5e5b561a"
            }
          ],
          "execution_time": 4727
        },
        {
          "synchronized": true,
          "request": {
            "headers": "",
            "payload": "",
            "verb": "POST",
            "url": ""
          },
          "response": {
            "code": 200,
            "payload": ""
          },
          "context": {
            "output": null,
            "user_input": "",
            "execution_parameters": [
              {
                "value_text": "Benjamin",
                "name": "name",
                "completed": true,
                "type": "sys.names",
                "value": "Benjamin"
              }
            ],
            "url": "",
            "status": {
              "code": 200,
              "message": ""
            }
          },
          "type": "end_call",
          "request_id": "db2a0259-92fa-4067-a50c-728689276c58",
          "node_id": "5f7f2eca35e7e1a6c42754e9",
          "tags": [
            {
              "tag": "three",
              "category": "ddbc05ccbc48431d898104ac5e5b561a"
            }
          ],
          "execution_time": 0
        }
      ]
    }
  ],
  "page_size": "10", // The page size the user provided
  "page_number": "0"  // The page number the user provided
}

Make your Call Recordings public

When you enable "Public Recordings", the Call Recording URL received through the Insights API, will be available publicly. Once queried, simply take the audio URL and paste it into your browser's address bar.

You will find the audio URL in the response as displayed below:

 "channel_data": {
        "duration": 27000,
        "audio_url": "5f7f277cf090a7001116fabe/5f7f2f337340dc7249f81406/8ae433e8-7bc1-41a0-b0a6-0cccc30cbc36.mp3",
        "call_status": "ended",
        "status_code": 200

Last updated