Skip to main content
GET
/
api
/
v1
/
custom_messages
/
{custom_message_id}
Python (SDK)
import os
from syllable_sdk import SyllableSDK


with SyllableSDK(
    api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:

    res = ss_client.custom_messages.get_by_id(custom_message_id=909433)

    # Handle response
    print(res)
{
  "name": "<string>",
  "text": "<string>",
  "id": 123,
  "updated_at": "2023-11-07T05:31:56Z",
  "last_updated_by": "<string>",
  "preamble": "If this is an emergency, please hang up and call 911.",
  "label": "Customer service",
  "rules": [],
  "agent_count": 1,
  "type": "greeting"
}

Authorizations

Syllable-API-Key
string
header
required

Path Parameters

custom_message_id
integer
required

Response

Successful Response

Response model for custom message operations. A custom message is a pre-configured message delivered by an agent as a greeting at the beginning of a conversation. Multiple agents can use the same custom mesasage. A custom message has one or more rules defined, which allow for different messages to be dynamically selected and delivered at runtime based on the current time and either date or day of the week. For more information, see Console docs.

name
string
required

The name of the custom message

Example:

"Customer service greeting"

text
string
required

The default message that the agent will deliver if no rules are set or no rules match the current timestamp.

Example:

"Hello and thank you for calling customer service. How can I help you today?"

id
integer
required

The ID of the custom message

Example:

1

updated_at
string<date-time>
required

Timestamp of the most recent update to the custom message

Example:

"2024-01-01T00:00:00Z"

last_updated_by
string
required

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

preamble
string | null

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.

Example:

"If this is an emergency, please hang up and call 911."

label
string | null

The label of the custom message

Example:

"Customer service"

rules
CustomMessageRule · object[]

Rules for time-specific message variants

Example:
[
{
"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"
}
]
agent_count
integer | null

The number of agents using the custom message

Example:

1

type
string
default:greeting

Type of the custom message (must be "greeting" for now)

Example:

"greeting"