For AI agents: this page in Markdown: https://www.pubnub.com/docs/chat/chat-sdk/build/features/messages/send-receive.md. Documentation index: https://www.pubnub.com/llms-full.txt.
Send and receive messages
Requires Message Persistence
Enable Message Persistence on your keyset in the Admin Portal to store messages.
Send
Use sendText() to send plain text messages to a channel with lightweight delivery options. If you need to send rich content (mentions, channel references, links, files, or quoted messages), use MessageDraft instead.
Encryption available
The Chat SDK supports AES-CBC 256-bit encryption for messages and files. See data security configuration.