メニュー

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

StyleSheet

StyleSheets enable you to give your Assistant a style by specifying its voice, error messages, success messages, and data collection validation behavior.

  • voice: the assistant's style for Programmable Voice.
    • say_voice: specify the assistant's text-to-speech voice.
  • collect: the assistant's style for the collect action.
    • validate: set which task the assistant should use if there is a failure when collecting data
      • on_failure: specify the message the assistant says when a question is answered with invalid input
      • on_success: specify the message the assistant says when a question is answered with valid input
      • max_attempts: the max number of times the assistant should attempt to collect data before redirecting to the on_failure task or URL.

All Autopilot REST API resources use the following base URL:

https://autopilot.twilio.com/v1/

Example Stylesheets data

{
	"style_sheet": {
		"voice": {
			"say_voice": "Polly.Matthew"
		},
		"collect": {
			"validate": {
				"on_failure": {
					"messages": [
						{
							"say": "I'm sorry, can you please say that again"
						},
						{
							"say": "hmm I still did'nt catch that, can you please repeat"
						},
						{
							"say": "Let's give it one more try. Please say it one more time"
						}
					],
					"repeat_question": false
				},
				"on_success": {
					"say": ""
				},
				"max_attempts": 4
			}
		}
	}
}

StyleSheet properties

Names in PHP format
accountSid
sid<AC> Not PII

The unique ID of the Account that created this Assistant

assistantSid
sid<UA> Not PII

The unique ID of the Assistant

url
url Not PII

data
オブジェクト Not PII

The JSON style sheet object

Fetch a StyleSheet resource

GET
https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/StyleSheet
パラメーター
Names in None format
assistant_sid
必須
GET sid_like<UA> Not PII

The unique ID of the Assistant

        
        
        
        

        Update a StyleSheet resource

        post
        https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/StyleSheet
        パラメーター
        Names in None format
        assistant_sid
        必須
        post sid_like<UA> Not PII

        The unique ID of the Assistant

        style_sheet
        オプション
        post オブジェクト Not PII

        The JSON Style sheet string

        例 1
              
              
              
              
              例 2
                    
                    
                    
                    
                    Rate this page:

                    ヘルプが必要ですか?

                    We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.