Remove a reaction

Works on
  • iMessage
  • WhatsApp

Take back a reaction your line added

POST/v1/commands/reaction.remove

Takes back a reaction your line added to a message. On iMessage, name it by the same emoji you reacted with. On WhatsApp the line has one reaction per message, so a remove names no emoji.

Honors Idempotency-Key.

Body

Target

A conversation target: the conversation the message is in, at target.conversationId. A reaction addressed by a phone number or another address instead is 422 validation_failed at target.conversationId before anything is sent. The target may also name the message itself at target.messageId, by the messageId Mapier gave it, in place of payload.targetExternalId.

Payload

FieldTypeRequiredDescription
targetExternalIdstringNoThe message: the externalId its message event carried, or, for a message the person sent, its messageId. Or name it at target.messageId by that messageId instead.
emojistring, 1 to 140 charactersNoThe reaction to take off, by the emoji you reacted with. An iMessage line needs it. A line that keeps one reaction per message takes that one off and refuses an emoji.

The message is named at payload.targetExternalId, or at target.messageId by its messageId, and, on iMessage, the reaction at payload.emoji. On an iMessage line each is a 422 validation_failed before anything is sent: at payload.emoji for a missing emoji or one that is not one emoji, and at payload.<key> for any other field. A channel's own limits on reactions are in GET /v1/capabilities, under that channel's restrictions, with what a call that breaks one answers.

On a WhatsApp line, name the message by the externalId its message event carried, and send no emoji. A remove is refused outside 24 hours of the person's last message, with 403 recipient_not_allowed, like a reaction.

Example request

curl https://api.mapier.ai/v1/commands/reaction.remove \
  -H "Authorization: Bearer $MAPIER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: unreact-order-2481-thumbs" \
  -H "x-mapier-version: 2026-12-01" \
  -d '{
    "target": { "conversationId": "a0000000-0000-4000-8000-000000000001" },
    "payload": { "targetExternalId": "5D1B7E0A-2F3C-4B8E-9A61-1C2D3E4F5A6B", "emoji": "👍" }
  }'

Response

202 Accepted
{
  "commandId": "3f1a0c2e-8b47-4d19-9a5e-2c6f0b8d4e71",
  "status": "queued",
  "repeated": false,
  "lineId": "0192a7b0-3e4f-7051-8c6d-7e8f9a0b1c2d",
  "lineSelection": "reused_active_chat"
}

Then the command event on the stream gives the result. On a channel that does not carry the type, the request is 404 unsupported_command with reason: not_on_channel, before anything is queued.

Errors

Every command can return the errors listed under How commands work › Errors. Specific to this command: the 422s above, before anything is sent, and the result failed with stale_target when the line cannot find the message.

Guide