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
|
The SID of the Account that created the FieldType resource. |
date_created
|
The date and time in GMT when the resource was created specified in RFC 2822 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in RFC 2822 format. |
friendly_name
|
The string that you assigned to describe the resource. It is not unique and can be up to 255 characters long. |
links
|
A list of the URLs of related resources. |
assistant_sid
|
The SID of the Assistant that is the parent of the resource. |
sid
|
The unique string that we created to identify the FieldType resource. |
unique_name
|
An application-defined string that uniquely identifies the resource. It can be used in place of the resource's |
url
|
The absolute URL of the FieldType resource. |
Create a FieldType resource
https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/FieldTypes
Creates a new FieldType
Parameters
Parameters in REST API format | |
---|---|
assistant_sid
Path
|
The SID of the Assistant that is the parent of the new resource. |
unique_name
Required
|
An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the |
friendly_name
Optional
|
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
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
|
The SID of the Assistant that is the parent of the resource to fetch. |
sid
Path
|
The Twilio-provided string that uniquely identifies the FieldType resource to fetch. |
Example 1
Read multiple FieldType resources
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
|
The SID of the Assistant that is the parent of the resources to read. |
Example 1
Update a FieldType resource
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
|
The SID of the Assistant that is the parent of the to update. |
sid
Path
|
The Twilio-provided string that uniquely identifies the FieldType resource to update. |
friendly_name
Optional
|
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
|
An application-defined string that uniquely identifies the resource. It can be used as an alternative to the |
Example 1
Delete a FieldType resource
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
|
The SID of the Assistant that is the parent of the resources to delete. |
sid
Path
|
The Twilio-provided string that uniquely identifies the FieldType resource to delete. |
Example 1
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.