Body
-
CallbackEvents string
Reserved.
-
CallbackUrl string(uri)
Reserved.
-
A JSON object that defines the Assistant's default tasks for various scenarios, including initiation actions and fallback tasks.
-
FriendlyName string
A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long.
-
LogQueries boolean
Whether queries should be logged and kept after training. Can be:
true
orfalse
and defaults totrue
. Iftrue
, queries are stored for 30 days, and then deleted. Iffalse
, no queries are stored. -
The JSON string that defines the Assistant's style sheet
-
UniqueName string
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.
POST /v1/Assistants
curl \
-X POST https://autopilot.twilio.com/v1/Assistants \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'CallbackEvents=string&CallbackUrl=https%3A%2F%2Fexample.com&FriendlyName=string&LogQueries=true&UniqueName=string'
Request example
{
"CallbackEvents": "string",
"CallbackUrl": "https://example.com",
"FriendlyName": "string",
"LogQueries": true,
"UniqueName": "string"
}
Request examples
{
"CallbackEvents": "string",
"CallbackUrl": "https://example.com",
"FriendlyName": "string",
"LogQueries": true,
"UniqueName": "string"
}
Response examples (201)
{
"account_sid": "string",
"callback_events": "string",
"callback_url": "https://example.com",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"development_stage": "string",
"friendly_name": "string",
"latest_model_build_sid": "string",
"links": {},
"log_queries": true,
"needs_model_build": true,
"sid": "string",
"unique_name": "string",
"url": "https://example.com"
}
Response examples (201)
{
"account_sid": "string",
"callback_events": "string",
"callback_url": "https://example.com",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"development_stage": "string",
"friendly_name": "string",
"latest_model_build_sid": "string",
"links": {},
"log_queries": true,
"needs_model_build": true,
"sid": "string",
"unique_name": "string",
"url": "https://example.com"
}