Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

Menu

Expand
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?

Field Type

The FieldType resource is a custom, user-built Field "type" to be extracted from the end user's input.

Just as a web form has field types like numbers, dates, or amounts, Autopilot has field types so that the natural language understanding model knows what values to extract as fields.

With the FieldType Resource, you can define custom field types that are relevant to your application. FieldTypes are identified by their UniqueName.

All Autopilot REST API resources use the following base URL:

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

FieldType properties

Names in PHP format
accountSid
sid<AC> Not PII

The SID of the Account that created the FieldType resource.

dateCreated
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in RFC 2822 format.

dateUpdated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in RFC 2822 format.

friendlyName
string Not PII

The string that you assigned to describe the resource. It is not unique and can be up to 255 characters long.

links
uri_map Not PII

A list of the URLs of related resources.

assistantSid
sid<UA> Not PII

The SID of the Assistant that is the parent of the resource.

sid
sid<UB> Not PII

The unique string that we created to identify the FieldType resource.

uniqueName
string Not PII

An application-defined string that uniquely identifies the resource. It can be used in place of the resource's sid in the URL to address the resource.

url
url Not PII

The absolute URL of the FieldType resource.

Create a FieldType resource

post
https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/FieldTypes

Creates a new FieldType

Parameters
Names in None format
assistant_sid
Required
post sid_like<UA> Not PII

The SID of the Assistant that is the parent of the new resource.

unique_name
Required
post string Not PII

An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the sid in the URL path to address the resource. The first 64 characters must be unique.

friendly_name
Optional
post string Not PII

A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long.

Example 1
        
        
        
        

        Fetch a FieldType resource

        get
        https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}

        Returns the Field Type instance identified by {FieldTypeSid} or {FieldTypeUniqueName}.

        Parameters
        Names in None format
        assistant_sid
        Required
        get sid_like<UA> Not PII

        The SID of the Assistant that is the parent of the resource to fetch.

        sid
        Required
        get sid_like<UB> Not PII

        The Twilio-provided string that uniquely identifies the FieldType resource to fetch.

        Example 1
              
              
              
              

              Read multiple FieldType resources

              get
              https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/FieldTypes

              Returns the complete list of Field Types for this Assistant. The list includes paging information.

              Parameters
              Names in None format
              assistant_sid
              Required
              get sid_like<UA> Not PII

              The SID of the Assistant that is the parent of the resources to read.

              Example 1
                    
                    
                    
                    

                    Update a FieldType resource

                    post
                    https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}

                    Updates the Field Type instance identified by {FieldTypeSid} or {FieldTypeUniqueName}.

                    Parameters
                    Names in None format
                    assistant_sid
                    Required
                    post sid_like<UA> Not PII

                    The SID of the Assistant that is the parent of the to update.

                    sid
                    Required
                    post sid_like<UB> Not PII

                    The Twilio-provided string that uniquely identifies the FieldType resource to update.

                    friendly_name
                    Optional
                    post string Not PII

                    A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.

                    unique_name
                    Optional
                    post string Not PII

                    An application-defined string that uniquely identifies the resource. It can be used as an alternative to the sid in the URL path to address the resource. The first 64 characters must be unique.

                    Example 1
                          
                          
                          
                          

                          Delete a FieldType resource

                          delete
                          https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}

                          Deletes a Field Type.

                          Before you can delete a FieldType, you must first delete all values and any of your FieldType's associations with any task.

                          Parameters
                          Names in None format
                          assistant_sid
                          Required
                          delete sid_like<UA> Not PII

                          The SID of the Assistant that is the parent of the resources to delete.

                          sid
                          Required
                          delete sid_like<UB> Not PII

                          The Twilio-provided string that uniquely identifies the FieldType resource to delete.

                          Example 1
                                
                                
                                
                                
                                Rate this page:

                                Need some help?

                                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.