Menu

Expand
Rate this page:

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

Resource Properties in REST API format
account_sid
sid<AC> Not PII

The SID of the Account that created the FieldType resource.

date_created
date_time<iso8601> Not PII

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

date_updated
date_time<iso8601> Not PII

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

friendly_name
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.

assistant_sid
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.

unique_name
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
Parameters in REST API format
assistant_sid
Path
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
Loading Code Sample...
        
        

        Create a new FieldType for an Assistant

        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
        Parameters in REST API format
        assistant_sid
        Path
        get sid_like<UA> Not PII

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

        sid
        Path
        get sid_like<UB> Not PII

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

        Example 1
        Loading Code Sample...
              
              

              Fetch a FieldType

              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
              Parameters in REST API format
              assistant_sid
              Path
              get sid_like<UA> Not PII

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

              Example 1
              Loading Code Sample...
                    
                    

                    Read: List all FieldTypes for a given Assistant

                    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
                    Parameters in REST API format
                    assistant_sid
                    Path
                    post sid_like<UA> Not PII

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

                    sid
                    Path
                    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
                    Loading Code Sample...
                          
                          

                          Update a FieldType

                          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
                          Parameters in REST API format
                          assistant_sid
                          Path
                          delete sid_like<UA> Not PII

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

                          sid
                          Path
                          delete sid_like<UB> Not PII

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

                          Example 1
                          Loading Code Sample...
                                
                                

                                Delete a FieldType

                                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 by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                                Loading Code Sample...
                                      
                                      
                                      

                                      Thank you for your feedback!

                                      Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                      Sending your feedback...
                                      🎉 Thank you for your feedback!
                                      Something went wrong. Please try again.

                                      Thanks for your feedback!

                                      thanks-feedback-gif