custom_messages

Update Custom Message

Changed on

Update a custom message

put/api/v1/custom_messages/

Request

  • Base URL
    https://api.syllable.cloud
  • URL
    https://api.syllable.cloud/api/v1/custom_messages/
  • Auth
    API key in header Syllable-API-Key

Request body

edit_commentsstring nullable

Optional comment for this saved version

namestring required

The name of the custom message

type'greeting' | 'email_template'

Type of custom message. Greeting is for voice; email_template is for email (subject + body).

preamblestring nullable

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

textstring required

The 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 nullable

Email subject. Required for email_template (in type_config); ignored otherwise.

labelstring nullable

The label of the custom message

repeat_after_language_changeboolean nullable

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

expected_versioninteger nullable

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

restored_from_versioninteger nullable

Historical version used as the source of an editable restore

idinteger required

The ID of the custom message

Example request

{
  "name": "Customer service greeting",
  "preamble": "If this is an emergency, please hang up and call 911.",
  "text": "Hello and thank you for calling customer service. How can I help you today?",
  "subject": "Your appointment reminder",
  "label": "Customer service",
  "rules": [
    {
      "date": "2025-01-01",
      "description": "Closed on New Year's Day",
      "invert": false,
      "text": "Hello, thank you for calling. Sorry, we're closed today.",
      "time_range_end": "17:00",
      "time_range_start": "09:00"
    },
    {
      "days_of_week": [
        "sa",
        "su"
      ],
      "description": "Closed on weekends",
      "invert": false,
      "text": "Hello, thank you for calling. Sorry, we're closed on weekends.",
      "time_range_end": "17:00",
      "time_range_start": "09:00"
    }
  ],
  "id": 1
}

Response

Successful Response

edit_commentsstring nullable
namestring required

The name of the custom message

type'greeting' | 'email_template'

Type of custom message. Greeting is for voice; email_template is for email (subject + body).

preamblestring nullable

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

textstring required

The 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 nullable

Email subject. Required for email_template (in type_config); ignored otherwise.

labelstring nullable

The label of the custom message

repeat_after_language_changeboolean required

If 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).

idinteger required
version_numberinteger

Current saved Message version

type_configobject

Persisted type-specific configuration

updated_atstring date-time required

Timestamp of the most recent update to the custom message

agent_countinteger nullable

The number of agents using the custom message

last_updated_bystring required

The email address of the user who most recently updated the custom message

Example response

{
  "name": "Customer service greeting",
  "preamble": "If this is an emergency, please hang up and call 911.",
  "text": "Hello and thank you for calling customer service. How can I help you today?",
  "subject": "Your appointment reminder",
  "label": "Customer service",
  "rules": [
    {
      "date": "2025-01-01",
      "description": "Closed on New Year's Day",
      "invert": false,
      "text": "Hello, thank you for calling. Sorry, we're closed today.",
      "time_range_end": "17:00",
      "time_range_start": "09:00"
    },
    {
      "days_of_week": [
        "sa",
        "su"
      ],
      "description": "Closed on weekends",
      "invert": false,
      "text": "Hello, thank you for calling. Sorry, we're closed on weekends.",
      "time_range_end": "17:00",
      "time_range_start": "09:00"
    }
  ],
  "updated_at": "2024-01-01T00:00:00Z",
  "agent_count": 1,
  "last_updated_by": "user@email.com"
}

Changes

    • warning

      the request property's maxLength was set to 255

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the new optional request property //

    • info

      added the optional property // to the response with the status