Skip to main content
Use custom messages when your app needs to send structured data that is not one of the built-in text or media message types. Keep the payload JSON-serializable and version your custom schema in your app code so older clients can render safely.

Parameters

Send A Custom Message

Create a custom message with a JSON-serializable payload that your app knows how to render.

Add Tags, Metadata, Or Reply Context

Attach app-owned tags, metadata, or a parentId when the custom message needs filtering, rendering context, or reply threading.

Rendering Guidance

  • Treat data as an app-owned contract.
  • Include a type or version field such as kind so clients can choose the renderer.
  • Provide a fallback renderer for unknown custom payloads.
  • Keep sensitive data out of custom payloads unless your product explicitly requires it.

Text Message

Send plain chat content.

Reply to a Message

Send custom replies with parentId.