To get segments for given reservation Ids

GET /v1/Insights/Segments

To get segments for given reservation Ids

Headers

  • Authorization string

    The Authorization HTTP request header

Query parameters

  • SegmentId string

    To unique id of the segment

  • ReservationId array[string]

    The list of reservation Ids

    Minimum length of each is 34, maximum length of each is 34. Format of each should match the following pattern: ^WR[0-9a-fA-F]{32}$.

  • PageSize integer(int64)

    How many resources to return in each list page. The default is 50, and the maximum is 1000.

    Minimum value is 1, maximum value is 1000.

  • Page integer

    The page index. This value is simply for client state.

    Minimum value is 0.

  • PageToken string

    The page token. This is provided by the API.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • segments array[object]
      Hide segments attributes Show segments attributes object
      • segment_id string | null

        To unique id of the segment

      • external_id string | null

        The unique id for the conversation.

      • queue string | null
      • external_contact string | null
      • date string | null

        The date of the conversation.

      • account_id string | null

        The unique id for the account.

      • agent_id string | null

        The unique id for the agent.

      • agent_phone string | null

        The phone number of the agent.

      • agent_name string | null

        The name of the agent.

      • agent_team_name string | null

        The team name to which agent belongs.

      • agent_team_name_in_hierarchy string | null

        he team name to which agent belongs.

      • customer_phone string | null

        The phone number of the customer.

      • customer_name string | null

        The name of the customer.

      • segment_recording_offset string | null

        The offset value for the recording.

      • media

        The media identifiers of the conversation.

      • assessment_type

        The type of the assessment.

      • assessment_percentage

        The percentage scored on the Assessments.

      • url string(uri) | null
    • meta object
      Hide meta attributes Show meta attributes object
      • first_page_url string(uri)
      • key string
      • next_page_url string(uri) | null
      • page integer
      • page_size integer
      • previous_page_url string(uri) | null
      • url string(uri)
GET /v1/Insights/Segments
curl \
 --request GET 'https://flex-api.twilio.com/v1/Insights/Segments' \
 --user "username:password" \
 --header "Authorization: string"
{
  "meta": {
    "key": "segments",
    "url": "https://flex-api.twilio.com/v1/Insights/Segments?ReservationId=WReeeff42d5326cfdaa0f7a1181d00f1b1&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://flex-api.twilio.com/v1/Insights/Segments?ReservationId=WReeeff42d5326cfdaa0f7a1181d00f1b1&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "segments": []
}
{
  "meta": {
    "key": "segments",
    "url": "https://flex-api.twilio.com/v1/Insights/Segments?ReservationId=WReeeff42d5326cfdaa0f7a1181d00f1b1&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://flex-api.twilio.com/v1/Insights/Segments?ReservationId=WReeeff42d5326cfdaa0f7a1181d00f1b1&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "segments": [
    {
      "url": "https://flex-api.twilio.com/v1/Insights/Segments/02dd8a65-c9e3-550b-9e98-5b11abb9b3a5",
      "date": "2022-02-08T08:00:00Z",
      "media": null,
      "queue": "Everyone",
      "agent_id": "0e4a8059-18a3-5e48-9efb-29ae3213e7fe",
      "account_id": "76e4c1c3-6f93-5d08-ae66-aad4b9092f2d",
      "agent_link": null,
      "agent_name": "Flex Insights",
      "segment_id": "02dd8a65-c9e3-550b-9e98-5b11abb9b3a5",
      "agent_phone": "+13051515226",
      "external_id": "EV4ab3c50aeeb9dc48c96f7290cf626a37",
      "customer_link": null,
      "customer_name": "+420606078007",
      "customer_phone": "+420606078007",
      "agent_team_name": "Everyone",
      "assessment_type": [
        null
      ],
      "external_contact": "+13051515226",
      "assessment_percentage": [
        null
      ],
      "external_segment_link": null,
      "external_segment_link_id": null,
      "segment_recording_offset": null,
      "agent_team_name_in_hierarchy": "Everyone"
    }
  ]
}
{
  "meta": {
    "key": "segments",
    "url": "https://flex-api.twilio.com/v1/Insights/Segments?SegmentId=02dd8a65-c9e3-550b-9e98-5b11abb9b3a5&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://flex-api.twilio.com/v1/Insights/Segments?SegmentId=02dd8a65-c9e3-550b-9e98-5b11abb9b3a5&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "segments": [
    {
      "url": "https://flex-api.twilio.com/v1/Insights/Segments/02dd8a65-c9e3-550b-9e98-5b11abb9b3a5",
      "date": "2022-02-08T08:00:00Z",
      "media": null,
      "queue": "Everyone",
      "agent_id": "0e4a8059-18a3-5e48-9efb-29ae3213e7fe",
      "account_id": "76e4c1c3-6f93-5d08-ae66-aad4b9092f2d",
      "agent_link": null,
      "agent_name": "Flex Insights",
      "segment_id": "02dd8a65-c9e3-550b-9e98-5b11abb9b3a5",
      "agent_phone": "+13051515226",
      "external_id": "EV4ab3c50aeeb9dc48c96f7290cf626a37",
      "customer_link": null,
      "customer_name": "+420606078007",
      "customer_phone": "+420606078007",
      "agent_team_name": "Everyone",
      "assessment_type": [
        null
      ],
      "external_contact": "+13051515226",
      "assessment_percentage": [
        null
      ],
      "external_segment_link": null,
      "external_segment_link_id": null,
      "segment_recording_offset": null,
      "agent_team_name_in_hierarchy": "Everyone"
    }
  ]
}