NAME

Twilio::Rest::FlexApi::V1::InsightsQuestionnaires - The InsightsQuestionnaires resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

my $insights_questionnaires = $client->flex_api->v1->insights_questionnaires->create($name, \%options);
for my $insights_questionnaires ($client->flex_api->v1->insights_questionnaires->read({}, 20)) {
  ...
}
my $insights_questionnaires = $client->flex_api->v1->insights_questionnaires($questionnaire_sid)->fetch;
$client->flex_api->v1->insights_questionnaires($questionnaire_sid)->update($active, \%options);
$client->flex_api->v1->insights_questionnaires($questionnaire_sid)->delete;

DESCRIPTION

This file holds InsightsQuestionnairesList, InsightsQuestionnairesPage, InsightsQuestionnairesContext and InsightsQuestionnairesInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

InsightsQuestionnairesList

Returned by $client->flex_api->v1->insights_questionnaires. See also Twilio::ListResource.

create

my $insights_questionnaires = $client->flex_api->v1->insights_questionnaires->create($name, \%options);

To create a Questionnaire. Returns a InsightsQuestionnairesInstance.

The required values are:

$name

The name of this questionnaire

The options are:

active

The flag to enable or disable questionnaire

description

The description of this questionnaire

question_sids

The list of questions sids under a questionnaire An array reference.

authorization

The Authorization HTTP request header

read

my @records = $client->flex_api->v1->insights_questionnaires->read(\%options, $limit, $page_size);

To get all questionnaires with questions. Returns the records as a list, fetching as many pages as it needs.

The options are:

authorization

The Authorization HTTP request header

include_inactive

Flag indicating whether to include inactive questionnaires or not

stream

my $stream = $client->flex_api->v1->insights_questionnaires->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->flex_api->v1->insights_questionnaires->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->flex_api->v1->insights_questionnaires->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->flex_api->v1->insights_questionnaires->get_context($questionnaire_sid);

Returns a InsightsQuestionnairesContext, and makes no request.

InsightsQuestionnairesPage

A Twilio::Page of InsightsQuestionnairesInstance objects.

records_key

build_instance

Used by Twilio::Page.

InsightsQuestionnairesContext

Returned by $client->flex_api->v1->insights_questionnaires($questionnaire_sid). It makes no request until one of these methods is called.

fetch

my $insights_questionnaires = $client->flex_api->v1->insights_questionnaires($questionnaire_sid)->fetch(\%options);

To get the Questionnaire Detail. Returns a InsightsQuestionnairesInstance.

The options are:

authorization

The Authorization HTTP request header

update

my $insights_questionnaires = $client->flex_api->v1->insights_questionnaires($questionnaire_sid)->update($active, \%options);

To update the questionnaire. Returns a InsightsQuestionnairesInstance.

The required values are:

$active

The flag to enable or disable questionnaire

The options are:

description

The description of this questionnaire

name

The name of this questionnaire

question_sids

The list of questions sids under a questionnaire An array reference.

authorization

The Authorization HTTP request header

delete

$client->flex_api->v1->insights_questionnaires($questionnaire_sid)->delete(\%options);

To delete the questionnaire. Returns true.

The options are:

authorization

The Authorization HTTP request header

InsightsQuestionnairesInstance

See also Twilio::InstanceResource.

It has fetch, update and delete, which work as they do on the context.

Its fields are:

account_sid

The SID of the Account that created the Flex Insights resource and owns this resource.

active

The flag to enable or disable questionnaire

description

The description of this questionnaire

name

The name of this category.

questionnaire_sid

The sid of this questionnaire

questions

The list of questions with category for a questionnaire

url

No description in the specification.

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.