AnyLinga
EN
Log in Try it free

Help Center/AI agent

How AI agents add reactions and receive client reaction events

Updated: 2026-11-13

To have an AI agent add or remove a reaction, send a request to /api/connect/react with the message ID and emoji. To notify your n8n workflow about client reactions, turn on Notify the AI about client reactions in the AI gateway settings.

How to add or remove a reaction

Send POST /api/connect/react with the header Authorization: Bearer <token>. The token is the value of the Callback token field on the Connect your AI page. This is the same token used to reply to clients.

Include message_id and emoji in the request body. You can react to a client message or a message sent by the agent.

To remove a reaction, pass an empty string: "emoji": "".

POST https://app.anylinga.com/api/connect/react
Authorization: Bearer <Callback token>
Content-Type: application/json

{
  "message_id": "6a1f3c2e-9b7d-4e5a-8c21-0d4b7e9f2a13",
  "emoji": "👍"
}
The limit is 60 requests per minute.

Where to find message_id

message_id is the message ID in AnyLinga. To react to a client message, use the message_id field from the incoming message received by the workflow.

To react to the agent's text, use the message_id field from AnyLinga's response to the callback or /api/connect/send. If only templates were sent, without text, the response does not include a message_id field.

Which channels support reactions

An AI agent can add reactions in WhatsApp connected via QR code, WhatsApp Business API, and Telegram bots.

In other channels—personal Telegram, Instagram, Facebook, TikTok, MAX, LinkedIn, and web chat—AnyLinga returns 422 reactions_not_supported. In personal Telegram, Telegram business bots do not have permission to add reactions.

The manager sees the agent's reaction on the same message in the Kommo chat, just like an employee's reaction. If the reaction is successfully mirrored, the response is {"ok": true, "crm_mirrored": true}.

If the reaction could not be mirrored in Kommo, the response includes "crm_mirrored": false. The reaction was still sent to the client.

What the API responses mean

Check the response code and the crm_mirrored value to distinguish between sending the reaction to the client and displaying it in Kommo.

ResponseMeaning
200The reaction was sent to the client; crm_mirrored indicates whether it appeared in Kommo.
400message_id does not look like a message ID, or emoji contains more than one emoji.
401Invalid Callback token.
404 message_not_foundThe message does not exist or belongs to another account.
422 reactions_not_supportedAnyLinga does not support adding reactions in this channel.
422 no_messenger_idThe message has no ID in the messenger, so there is no message to react to.
502 send_failedThe messenger rejected the reaction, for example, if emoji does not contain an emoji.

How to enable client reaction notifications

Before enabling notifications, make sure the workflow checks the event field: regular client messages do not have this field.

1. Open the AI gateway settings

  • Go to Tools & Settings → AI gateway and open the Connect your AI page.

2. Enable reaction notifications

  • Under the Enable gateway toggle, find Notify the AI about client reactions and turn it on.
  • The setting is saved as soon as you click it. You do not need to click Save.
The toggle is off by default. It is visible regardless of which CRM you use.

How to handle a client_reaction event

When a client adds or removes a reaction, a client_reaction event is sent to the same n8n webhook URL with the same X-AnyLinga-Signature signature. You do not need to reply through the callback; the webhook must return 2xx. Deal filters do not apply to this event.

Use the event field to distinguish the event from a client message. Use message_id to identify which message the client reacted to.

FieldContents
eventclient_reaction.
conversation_idThe conversation.
channelThe channel.
contact_idThe contact in Kommo or null.
message_idThe message the client reacted to: the same ID as in the incoming message or callback response.
message_directioninbound for a reaction to a client message, outbound for a reaction to a business message.
emojiThe reaction emoji.
actionreact if the client added a reaction, unreact if they removed it.
tsThe time.
One change produces one event: if the messenger sends the same reaction again, the workflow receives it only once. When a reaction is removed, unreact is sent with the emoji the client removed. A reaction to an old message that is not in AnyLinga does not produce an event.

Which fields the workflow receives, how an AI agent and a manager work in the same chat, how to connect an AI agent through n8n.

Did you find this article helpful?

Get in touch

We reply during business hours.

Already using AnyLinga?

Describe your question and we'll reply on WhatsApp or by email.

New to AnyLinga?

Try it yourself, or we'll set it up for you when you pay for the first month.

Discuss setup

What you need