← All Foundational Objects/Prefix: ctme_14 Fields
AI-Agent-First Documentation
/SKILL.md
Prompt your Agent: "Query and mutate records on the 'chat_message' table (ID prefix 'ctme_') using platform.records and platform.query.sql, ensuring all lookup fields use plain string IDs."

Chat Message (chat_message)

Chat messages are the actual content inside each chat. They allow users and contacts to communicate with each other

Python SDK & PlatformContext Example
# 1. Query chat_message via parameterized ANSI SQL
rows = await platform.query.sql("SELECT id, name, created_date FROM chat_message ORDER BY created_date DESC LIMIT 25")

# 2. Create chat_message record (Generates 'ctme_...' Base62 ID)
created = await platform.records.create("chat_message", [
    {"name": "Example Chat Message"}
])
Field API NameType / FormatLookup TargetFlagsDescription
idstring—requiredId
namestring—requiredName
created_datestringdate-time—Created Date
modified_datestringdate-time—Modified Date
created_bystringlookup→ user (string ID)requiredsystemCreated By
modified_bystringlookup→ user (string ID)requiredsystemModified By
chatstringlookup→ chat (string ID)requiredChat
bodystringmarkdown—The message contents that were sent
directionstringenum—requiredDirection
participant_namestring—Participant Name
contactstringlookup→ contact (string ID)The contact who sent the message
userstringlookup→ user (string ID)The user that sent the message
readjsonjson—The read receipt of each user or contact for the message
shared_withlistsharing—systemShared With