Custom Messages List
List the existing custom_messages
/api/v1/custom_messages/Authentication
Syllable-API-KeyrequiredSend Syllable-API-Key in the header.
Need a credential? Create or manage an API token in the Syllable Console.
Parameters
Query parameters
page
integer | null
query
optional
The page number from which to start (0-based)
0Minimum 0Example 0limit
integer
query
optional
The maximum number of items to return
25Minimum 0Example 25search_fields
enum<string>[]
query
optional
String names of fields to search. Correspond by index to search field values
[]Example nameItem schema
itemsenum<string>required["id","name","name_exact","text","label","type","updated_at","agent_id"]search_field_values
string[]
query
optional
Values of fields to search. Correspond by index to search fields. Unless field name contains "list", an individual search field value cannot be a list
[]Example Some Object NameItem schema
itemsstringrequiredorder_by
enum<string> | null
query
optional
The field whose value should be used to order the results
["id","name","name_exact","text","label","type","updated_at","agent_id"]Example nameorder_by_direction
enum<string> | null
query
optional
The direction in which to order the results
["asc","desc"]fields
enum<string>[] | null
query
optional
The fields to include in the response
[]Example []Item schema
itemsenum<string>required["id","name","name_exact","text","label","type","updated_at","agent_id"]start_datetime
string | null
query
optional
The start datetime for filtering results
2023-01-01T00:00:00Zend_datetime
string | null
query
optional
The end datetime for filtering results
2024-01-01T00:00:00ZResponses
200Successful Response
application/json
response
ListResponse_CustomMessageResponse_
required
5 fields
itemsCustomMessageResponse[]requiredList of items returned from the query
Item schema
itemsCustomMessageResponserequiredResponse model for custom message operations. A custom message is a pre-configured message delivered by an agent (e.g. as a greeting at the beginning of a conversation, or as an email template with subject and body). Multiple agents can use the same custom message. Greeting-type messages may have rules for time-based variants; email templates have a subject and body only. For more information, see Console docs.
12 fields
namestringrequiredThe name of the custom message
typeenum<string>optionalType of the custom message: greeting (voice) or email_template.
["greeting","email_template"]Default greetingpreamblestring | nulloptionalAn optional preamble that will be delivered before the main message, regardless of whether the current time and date match a rule or the system uses the default message. Cannot contain the "{{ language.mode }}" tag. In the case of a voice conversation, the user will not be able to interrupt the preamble. Can be used for e.g. legal disclaimers that the user must always see/hear.
textstringrequiredThe default message that the agent will deliver if no rules are set or no rules match the current timestamp. For email_template, this is the body.
subjectstring | nulloptionalEmail subject. Required for email_template (in type_config); ignored otherwise.
labelstring | nulloptionalThe label of the custom message
repeat_after_language_changebooleanrequiredIf true, if the caller changes language using the language menu in the custom message, the message will be repeated in the new language (not including the language menu).
rulesCustomMessageRule[]optionalRules for time-specific message variants
[]Item schema
itemsCustomMessageRulerequiredA rule used to determine whether a custom message should present a variant message based on the current timestamp.
7 fields
descriptionstringrequiredThe description of the rule
time_range_startstring | nulloptionalThe start of the time range for the rule in 24-hour format hh:mm (should be null for "all day" cases)
^([01]\d|2[0-3]):[0-5]\d$time_range_endstring | nulloptionalThe end of the time range for the rule in 24-hour format hh:mm (should be null for "all day" cases)
^([01]\d|2[0-3]):[0-5]\d$datestring | nulloptionalThe date for the rule in YYYY-MM-DD format
\b(19|20)\d{2}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])\bdays_of_weekenum<string>[] | nulloptionalThe days of the week for the rule
Item schema
itemsenum<string>requiredAvailable options for day of the week for use in message rules.
["mo","tu","we","th","fr","sa","su"]invertbooleanrequiredWhether the rule logic should be inverted (i.e. "not")
textstringrequiredMessage text associated with the rule
idintegerrequiredThe ID of the custom message
updated_atstring (date-time)requiredTimestamp of the most recent update to the custom message
agent_countinteger | nulloptionalThe number of agents using the custom message
last_updated_bystringrequiredThe email address of the user who most recently updated the custom message
pageintegerrequiredThe page number of the results (0-based)
page_sizeintegerrequiredThe number of items returned per page
total_pagesinteger | nulloptionalThe total number of pages of results given the indicated page size
total_countinteger | nulloptionalThe total number of items returned from the query
Response example
{
"items": [
{
"name": "string",
"type": "greeting",
"preamble": "string",
"text": "string",
"subject": "string",
"label": "string",
"repeat_after_language_change": true,
"rules": [],
"id": 0,
"updated_at": "string",
"agent_count": "string",
"last_updated_by": "string"
}
],
"page": 0,
"page_size": 0,
"total_pages": "string",
"total_count": "string"
}422Validation Error
application/json
response
HTTPValidationError
required
1 field
detailValidationError[]optionalItem schema
itemsValidationErrorrequired3 fields
locstring | integer[]requiredItem schema
itemsstring | integerrequired2 options
Option 1stringrequiredOption 2integerrequiredmsgstringrequiredtypestringrequiredResponse example
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
