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

# React to a message

> POST /api/v1/messages/:id/react — send a tapback reaction (love, like, dislike, laugh, emphasize, question).

<Note>
  **Auth.** HMAC v1 or bearer token — see [Authentication](/api/authentication).
  **Status.** Live · **Idempotent:** No (each call posts a fresh tapback).
</Note>

Sends a tapback reaction to a message in the chat. The six valid values map to the standard iMessage tapbacks (`love` ❤, `like` 👍, `dislike` 👎, `laugh` 😂, `emphasize` ‼, `question` ❓). The reaction is sent from the same line the original message was sent from, so the recipient sees the tapback attached to the right bubble.

### Which id goes in the URL

This is a message-scoped route: `{id}` is a `message_id`, not a `chat_id`. Prefer the Chert-issued **`message_id`** returned by [`POST /api/v1/send`](/api/sending), or the `message.id` returned by [`POST /api/v1/chats`](/api/chats/create) and [`POST /api/v1/chats/{id}/messages`](/api/chats/send-message). Chert resolves that id to the underlying iMessage identifier internally before sending the tapback.

<Note>
  For inbound messages and history rows, the `id` from [`GET /api/v1/chats/{id}/messages`](/api/chats/list-messages) and inbound `message.received` webhooks is also accepted.
</Note>

## Request

`POST /api/v1/messages/{id}/react`

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://console.trychert.com/api/v1/messages/msg_01H.../react \
    -H "x-chert-tenant: $TENANT" \
    -H "x-chert-signature: v1,$TS,$SIG" \
    -H "content-type: application/json" \
    -d '{"reaction": "love"}'
  ```

  ```js Node.js theme={null}
  const ts = Math.floor(Date.now() / 1000)
  const body = JSON.stringify({ reaction: "love" })
  const sig = crypto.createHmac("sha256", SIGNING_SECRET).update(`${ts}.${body}`).digest("hex")
  const res = await fetch(
    `https://console.trychert.com/api/v1/messages/${messageId}/react`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "x-chert-tenant": TENANT_SLUG,
        "x-chert-signature": `v1,${ts},${sig}`,
      },
      body,
    },
  )
  ```

  ```python Python theme={null}
  import hmac, hashlib, json, time, requests
  ts = int(time.time())
  body = json.dumps({"reaction": "love"})
  sig = hmac.new(SIGNING_SECRET.encode(), f"{ts}.{body}".encode(), hashlib.sha256).hexdigest()
  r = requests.post(
      f"https://console.trychert.com/api/v1/messages/{message_id}/react",
      headers={
          "Content-Type": "application/json",
          "x-chert-tenant": TENANT_SLUG,
          "x-chert-signature": f"v1,{ts},{sig}",
      },
      data=body,
  )
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "status": "sent",
    "message_id": "msg_01H...",
    "reaction": "love"
  }
  ```
</ResponseExample>

### Path parameters

<ParamField path="id" type="string" required>
  The Chert `message_id` returned by a send endpoint, or the message `id` surfaced on chat-message listings and inbound `message.received` webhook payloads.
</ParamField>

### Body

<ParamField body="reaction" type="enum" required>
  One of: `love` | `like` | `dislike` | `laugh` | `emphasize` | `question`. Maps to the six standard iMessage tapbacks.
</ParamField>

### Response fields

<ResponseField name="status" type="string">
  Always `"sent"` on success.
</ResponseField>

<ResponseField name="message_id" type="string">
  The Chert `message_id` the reaction was attached to.
</ResponseField>

<ResponseField name="reaction" type="enum">
  Echoed-back normalized reaction value.
</ResponseField>

## Errors

| Code   | HTTP | When                        |
| ------ | ---- | --------------------------- |
| `1002` | 400  | Invalid reaction value.     |
| `1004` | 400  | Invalid JSON body.          |
| `2003` | 404  | Message not found.          |
| `4001` | 502  | Delivery failed downstream. |

See the full [error code reference](/api/errors).

## See also

* [Edit a message](/api/messages/edit)
* [Send a message](/api/chats/send-message)
* [List messages in a chat](/api/chats/list-messages)
