ClientPublishRequest

Client publish body — used on the realtime edge with a user JWT. The sender is the token's subject (omit senderId). Subject to your config's authorization and publish middleware.

  • The message payload. Opaque to the platform; ≤ 2 KB.

  • Content class. Defaults to text (the only value in v1).

  • Declared mentions. The platform verifies each is a member, dedupes, and caps the count.

    Properties: 1
  • Reply into a thread: the id of the message that started it — that id IS the thread id. The reply is stored in the channel and delivered live to every channel connection like any other message; what narrows is notification, which goes only to the thread's participants (users who posted in or were mentioned in it).

    The parent is not required to still be resident in the channel's hot storage. Mutually exclusive with to — sending both is rejected validation_failed.

    Threads nest, to a cap of 8 levels: a reply whose thread would sit deeper is rejected validation_failed with reason: thread_depth_exceeded. A threadParentId naming a message the channel cannot have minted yet is rejected validation_failed with reason: thread_parent_unknown — an id whose message has merely aged out is still accepted, and its thread is recorded as top-level when the ancestry can no longer be resolved.

  • A member's user id. Set this to deliver to that member only (no broadcast) and write them an inbox item.

  • Userland discriminator. Defaults to message.