> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zavu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Send reaction to message

> Send an emoji reaction to an existing WhatsApp message. Reactions are only supported for WhatsApp messages.



## OpenAPI

````yaml /openapi.json post /v1/messages/{messageId}/reactions
openapi: 3.0.3
info:
  title: Zavu Unified Messaging Layer API
  version: 0.2.0
  description: >
    Unified multi-channel messaging API for Zavu.


    Supported channels:

    - **SMS**: Simple text messages

    - **WhatsApp**: Rich messaging with media, buttons, lists, CTA URL buttons,
    and templates

    - **Telegram**: Bot messaging with text, media, and interactive elements

    - **Email**: Transactional emails via Amazon SES


    Design goals:

    - Simple `send()` entrypoint for developers

    - Project-level authentication via Bearer token

    - Support for all WhatsApp message types (text, image, video, audio,
    document, sticker, location, contact, buttons, list, cta_url, reaction,
    template)

    - If a non-text message type is sent, WhatsApp channel is used automatically

    - 24-hour WhatsApp conversation window enforcement

    - Universal `to` field accepts phone numbers (E.164), email addresses, or
    numeric chat IDs (Telegram/Instagram)
servers:
  - url: https://api.zavu.dev
security:
  - bearerAuth: []
paths:
  /v1/messages/{messageId}/reactions:
    post:
      summary: Send reaction to message
      description: >-
        Send an emoji reaction to an existing WhatsApp message. Reactions are
        only supported for WhatsApp messages.
      operationId: sendReaction
      parameters:
        - $ref: '#/components/parameters/MessageIdParam'
        - $ref: '#/components/parameters/SenderHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReactionRequest'
            example:
              emoji: 👍
      responses:
        '202':
          description: Reaction accepted for delivery.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '400':
          description: Invalid request or message is not from WhatsApp.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                not_whatsapp:
                  summary: Not a WhatsApp message
                  value:
                    code: bad_request
                    message: Reactions are only supported for WhatsApp messages
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Message not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  parameters:
    MessageIdParam:
      name: messageId
      in: path
      required: true
      schema:
        type: string
    SenderHeader:
      name: Zavu-Sender
      in: header
      required: false
      description: >-
        Optional sender profile ID. If omitted, the project's default sender
        will be used.
      schema:
        type: string
        example: sender_12345
  schemas:
    ReactionRequest:
      type: object
      required:
        - emoji
      properties:
        emoji:
          type: string
          description: Single emoji character to react with.
          example: 👍
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          $ref: '#/components/schemas/Message'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: invalid_request
        message:
          type: string
          example: Phone number is invalid
        details:
          type: object
          additionalProperties: true
    Message:
      type: object
      required:
        - id
        - to
        - status
        - channel
        - messageType
        - createdAt
      properties:
        id:
          type: string
          example: jd7x2k3m4n5p6q7r8s9t0
        to:
          type: string
          example: '+56912345678'
        from:
          type: string
          example: '+13125551212'
        senderId:
          type: string
          example: sender_12345
        channel:
          $ref: '#/components/schemas/Channel'
        messageType:
          $ref: '#/components/schemas/MessageType'
        status:
          $ref: '#/components/schemas/MessageStatus'
        text:
          type: string
          description: Text content or caption.
        content:
          $ref: '#/components/schemas/MessageContent'
        providerMessageId:
          type: string
          description: Message ID from the delivery provider.
        errorCode:
          type: string
          nullable: true
        errorMessage:
          type: string
          nullable: true
        cost:
          type: number
          nullable: true
          description: MAU cost in USD (charged for first contact of the month).
        costProvider:
          type: number
          nullable: true
          description: Provider cost in USD (Telnyx, SES, etc.).
        costTotal:
          type: number
          nullable: true
          description: Total cost in USD (MAU + provider cost).
        metadata:
          type: object
          additionalProperties:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Channel:
      type: string
      description: Delivery channel. Use 'auto' for intelligent routing.
      enum:
        - auto
        - sms
        - sms_oneway
        - whatsapp
        - telegram
        - email
        - instagram
        - voice
    MessageType:
      type: string
      description: >-
        Type of message. Non-text types are supported by WhatsApp and Telegram
        (varies by type).
      enum:
        - text
        - image
        - video
        - audio
        - document
        - sticker
        - location
        - contact
        - buttons
        - list
        - cta_url
        - reaction
        - template
    MessageStatus:
      type: string
      enum:
        - queued
        - sending
        - sent
        - delivered
        - read
        - failed
        - received
        - pending_url_verification
    MessageContent:
      type: object
      description: Content for non-text message types (WhatsApp and Telegram).
      properties:
        mediaUrl:
          type: string
          description: URL of the media file (for image, video, audio, document, sticker).
          example: https://example.com/image.jpg
        mediaId:
          type: string
          description: WhatsApp media ID if already uploaded.
        mimeType:
          type: string
          description: MIME type of the media.
          example: image/jpeg
        filename:
          type: string
          description: Filename for documents.
          example: invoice.pdf
        latitude:
          type: number
          description: Latitude for location messages.
        longitude:
          type: number
          description: Longitude for location messages.
        locationName:
          type: string
          description: Name of the location.
        locationAddress:
          type: string
          description: Address of the location.
        contacts:
          type: array
          description: Contact cards for contact messages.
          items:
            type: object
            properties:
              name:
                type: string
              phones:
                type: array
                items:
                  type: string
        buttons:
          type: array
          description: Interactive buttons (max 3).
          maxItems: 3
          items:
            type: object
            required:
              - id
              - title
            properties:
              id:
                type: string
                maxLength: 256
              title:
                type: string
                maxLength: 20
        listButton:
          type: string
          description: Button text for list messages.
          maxLength: 20
        sections:
          type: array
          description: Sections for list messages.
          items:
            type: object
            required:
              - title
              - rows
            properties:
              title:
                type: string
              rows:
                type: array
                maxItems: 10
                items:
                  type: object
                  required:
                    - id
                    - title
                  properties:
                    id:
                      type: string
                    title:
                      type: string
                      maxLength: 24
                    description:
                      type: string
                      maxLength: 72
        ctaDisplayText:
          type: string
          description: Button label for cta_url messages.
          maxLength: 20
          example: See Dates
        ctaUrl:
          type: string
          format: uri
          description: >-
            Destination URL opened in the device's default browser when the
            button is tapped. Used with messageType=cta_url. WhatsApp requires
            HTTPS in production.
          example: https://example.com/schedule
        ctaHeaderType:
          type: string
          description: Optional header type for cta_url messages.
          enum:
            - text
            - image
            - video
            - document
        ctaHeaderText:
          type: string
          description: Header text when ctaHeaderType is 'text'.
          maxLength: 60
        ctaHeaderMediaUrl:
          type: string
          format: uri
          description: >-
            Public HTTPS URL of the header media when ctaHeaderType is 'image',
            'video', or 'document'. WhatsApp fetches this URL — it must be
            publicly reachable and return the declared content type.
        footerText:
          type: string
          description: Optional footer text for cta_url messages.
          maxLength: 60
          example: Dates subject to change.
        emoji:
          type: string
          description: Emoji for reaction messages.
        reactToMessageId:
          type: string
          description: Message ID to react to.
        templateId:
          type: string
          description: Template ID for template messages.
        templateVariables:
          type: object
          description: >-
            Variables for body placeholders. Keys are positions (1, 2, 3, ...)
            matching the order placeholders appear in the template body.
          additionalProperties:
            type: string
          example:
            '1': John
            '2': ORD-12345
        templateButtonVariables:
          type: object
          description: >-
            Variables for dynamic button placeholders (URL buttons and OTP
            buttons). Keys are the button index (0, 1, 2) in the template's
            `buttons` array — not the placeholder name. Values substitute the
            `{{1}}` placeholder inside that button's URL.


            **WhatsApp constraints:**

            - URL buttons only accept `{{1}}` — positional, numeric, no
            whitespace, no name. Named placeholders like `{{token}}` are stored
            as literal URL text by Meta and cannot be substituted.

            - At most one placeholder per URL button.

            - A template may have at most three buttons.

            - Static URL buttons (no placeholder) and `quick_reply` buttons are
            not included here.
          additionalProperties:
            type: string
          example:
            '0': abc-report-token
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````