Update Custom Message
Update a custom message
/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
This endpoint has no declared parameters.
Request body
application/json
body
CustomMessageUpdateRequest
required
12 fields
edit_commentsstring | nulloptionalOptional comment for this saved version
10000namestringrequiredThe name of the custom message
255typeenum<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_changeboolean | nulloptionalIf 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). If omitted or null on create, false is stored. If omitted or null on update, existing value will not be changed.
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.
8 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
^(19|20)\d{2}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$holidaysenum<string>[] | nulloptionalNamed holidays for the rule. Matches if the current date is any of them, resolved in the assigned agent timezone, so no per-year rule is needed. Accepts the same names the @hours rule engine accepts and stores them canonically.
1Item schema
itemsenum<string>requiredAll available named holidays
["christmas-day","christmas-day-observed","christmas-eve","independence-day","independence-day-observed","indigenous-peoples-day","columbus-day","juneteenth","juneteenth-observed","labor-day","memorial-day","mlk-day","new-years-day","new-years-day-observed","new-years-eve","presidents-day","thanksgiving-day","thanksgiving-day-after","thanksgiving-day-before","veterans-day","veterans-day-observed","good-friday"]days_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
expected_versioninteger | nulloptionalLatest live version explicitly acknowledged at save confirmation. A stale value returns 409 without saving; after warning and confirmation, resubmit retained edits with the newly acknowledged version.
1restored_from_versioninteger | nulloptionalHistorical version used as the source of an editable restore
1idintegerrequiredThe ID of the custom message
Request example
{
"edit_comments": "string",
"name": "string",
"type": "greeting",
"preamble": "string",
"text": "string",
"subject": "string",
"label": "string",
"repeat_after_language_change": "string",
"rules": [],
"expected_version": "string",
"restored_from_version": "string",
"id": 0
}Responses
200Successful Response
application/json
response
CustomMessageResponse
required
15 fields
edit_commentsstring | nulloptionalnamestringrequiredThe name of the custom message
255typeenum<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.
8 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
^(19|20)\d{2}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$holidaysenum<string>[] | nulloptionalNamed holidays for the rule. Matches if the current date is any of them, resolved in the assigned agent timezone, so no per-year rule is needed. Accepts the same names the @hours rule engine accepts and stores them canonically.
1Item schema
itemsenum<string>requiredAll available named holidays
["christmas-day","christmas-day-observed","christmas-eve","independence-day","independence-day-observed","indigenous-peoples-day","columbus-day","juneteenth","juneteenth-observed","labor-day","memorial-day","mlk-day","new-years-day","new-years-day-observed","new-years-eve","presidents-day","thanksgiving-day","thanksgiving-day-after","thanksgiving-day-before","veterans-day","veterans-day-observed","good-friday"]days_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
idintegerrequiredversion_numberintegeroptionalCurrent saved Message version
1type_configobjectoptionalPersisted type-specific configuration
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
Response example
{
"edit_comments": "string",
"name": "string",
"type": "greeting",
"preamble": "string",
"text": "string",
"subject": "string",
"label": "string",
"repeat_after_language_change": true,
"rules": [],
"id": 0,
"version_number": 1,
"type_config": "string",
"updated_at": "string",
"agent_count": "string",
"last_updated_by": "string"
}400Message could not be saved
application/json
response
CustomMessageErrorResponse
required
1 field
detailstringrequiredResponse example
{
"detail": "string"
}403Message write permission required
application/json
response
CustomMessageErrorResponse
required
1 field
detailstringrequiredResponse example
{
"detail": "string"
}404Message or source version not found
application/json
response
CustomMessageErrorResponse
required
1 field
detailstringrequiredResponse example
{
"detail": "string"
}409Expected Message version is stale
application/json
response
CustomMessageErrorResponse
required
1 field
detailstringrequiredResponse example
{
"detail": "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"
}
]
}500Message persistence failed
application/json
response
CustomMessageErrorResponse
required
1 field
detailstringrequiredResponse example
{
"detail": "string"
}
