Skip to content

Reactions

A reaction is a short response to an earlier message.

Type ID: xmtp.org/reaction:2.0. The payload is a ReactionV2 protobuf. The fallback describes the reaction and the earlier message. shouldPush defaults to false on Browser, Node, Kotlin, and Swift.

FieldMeaning
referenceID of the message that receives the reaction
referenceInboxIdOptional inbox ID of the referenced message sender
actionAdd or remove the reaction
schemaUnicode, short code, or custom schema
contentThe reaction value

The SDK codec takes a message reference, an optional sender inbox ID, and a nested reaction value with action, schema, and content. The wire protobuf stores these fields together. Its action codes are 0 (unspecified), 1 (added), and 2 (removed). Its schema codes are 0 (unspecified), 1 (Unicode), 2 (shortcode), and 3 (custom).

Use the schema that matches the content. A Unicode emoji uses the Unicode schema. The Agent SDK provides ctx.sendReaction().