To create a Questionnaire

POST /v1/Insights/QualityManagement/Questionnaires

To create a Questionnaire

Headers

  • Authorization string

    The Authorization HTTP request header

application/x-www-form-urlencoded

Body

  • Name string Required

    The name of this questionnaire

  • Description string

    The description of this questionnaire

  • Active boolean

    The flag to enable or disable questionnaire

  • QuestionSids array[string]

    The list of questions sids under a questionnaire

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

Responses

  • 201 application/json

    Created

    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
    • account_sid string | null

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

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

    • questionnaire_sid string | null

      The sid of this questionnaire

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

    • name string | null

      The name of this category.

    • description string | null

      The description of this questionnaire

    • active boolean | null

      The flag to enable or disable questionnaire

    • questions array | null

      The list of questions with category for a questionnaire

    • url string(uri) | null
POST /v1/Insights/QualityManagement/Questionnaires
curl \
 --request POST 'https://flex-api.twilio.com/v1/Insights/QualityManagement/Questionnaires' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --header "Authorization: string" \
 --data 'Name=abc&Active=false&Description=description&QuestionSids=GEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&QuestionSids=GEeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
Request example
{"Name"=>"abc", "Active"=>false, "Description"=>"description", "QuestionSids"=>["GEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "GEeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"]}
Response examples (201)
{
  "url": "https://flex-api.twilio.com/v1/Insights/QualityManagement/Questionnaires/GMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "name": "abc",
  "active": false,
  "questions": [
    {
      "usage": 0,
      "allow_na": false,
      "category": {
        "category_sid": "FYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "category_name": "test cat"
      },
      "question": "What is the total time",
      "description": "time spent",
      "question_sid": "GEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "answer_set_id": "a6a8a54f-5305-4aec-b92c-a6e429932f58"
    },
    {
      "usage": 0,
      "allow_na": false,
      "category": {
        "category_sid": "FYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "category_name": "test cat"
      },
      "question": "What is the total time",
      "description": "time spent",
      "question_sid": "GEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "answer_set_id": "a6a8a54f-5305-4aec-b92c-a6e429932f58"
    }
  ],
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "description": "description",
  "questionnaire_sid": "GMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}