Messages
React to a message
/v2/messages/{messageId}/reactions- Scope:
messages:send - Idempotency-Key:optional
- number key ok— Also accepts the legacy per-number x-api-key, for its own number.
- sends messages
One emoji; "" removes your reaction. For received messages pass numberId.
Parameters
Path
| Name | Type | Constraints | Description |
|---|---|---|---|
messageIdrequired | Typestring | Constraints— | DescriptionMessage id returned by POST /v2/messages. |
Headers
| Name | Type | Constraints | Description |
|---|---|---|---|
Idempotency-Keyoptional | Typestring | Constraints≤ 191 chars | DescriptionYour unique id for this operation (≤ 191 visible ASCII). A retry with the same key and body returns the first answer with Idempotent-Replayed: true — it never runs twice. Kept 24 h. |
X-Request-Idoptional | Typestring | Constraints— | DescriptionOptional: your own request id, echoed back (otherwise we generate req_…). Quote it to support. |
Body
| Name | Type | Constraints | Description |
|---|---|---|---|
emojirequired | Typestring | Constraints— | DescriptionOne emoji. "" removes your reaction. |
numberIdoptional | Typestring | Constraints— | DescriptionOnly to react to a received message (or one not sent through v2). |
Request
curl -X POST "https://mursilat.com/api/v2/messages/3EB0A1B2C3D4E5F60718/reactions" \
-H "Authorization: Bearer $WASLA_API_KEY" \
-H "Idempotency-Key: order-1042-confirm" \
-H "Content-Type: application/json" \
-d '{
"emoji": "👍"
}'const res = await fetch('https://mursilat.com/api/v2/messages/3EB0A1B2C3D4E5F60718/reactions', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WASLA_API_KEY}`,
'Idempotency-Key': 'order-1042-confirm',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"emoji": "👍"
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);import os
import requests
headers = {"Authorization": f"Bearer {os.environ['WASLA_API_KEY']}", "Idempotency-Key": "order-1042-confirm"}
res = requests.post(
"https://mursilat.com/api/v2/messages/3EB0A1B2C3D4E5F60718/reactions",
headers=headers,
json={
"emoji": "👍"
},
timeout=30,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)<?php
$ch = curl_init('https://mursilat.com/api/v2/messages/3EB0A1B2C3D4E5F60718/reactions');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('WASLA_API_KEY'),
'Idempotency-Key: order-1042-confirm',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'emoji' => '👍'
], JSON_UNESCAPED_UNICODE),
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) { throw new Exception($data['error']['code'] . ': ' . $data['error']['message']); }
print_r($data);{
"emoji": "👍"
}Response
200Example
{
"messageId": "3EB0A1B2C3D4E5F60718",
"action": "react",
"emoji": "👍"
}Response schema
Fields of the example answer. Expand objects and arrays.
responseobject3 fields
- messageIdstring "3EB0A1B2C3D4E5F60718"
- actionstring "react"
- emojistring "👍"
Errors
Besides the authentication, rate-limit and validation errors every endpoint can return:
- 400MESSAGE_REACTION_INVALIDemoji must be one emoji (or "").
- 404MESSAGE_NOT_FOUNDMessage not found.
Number Shield & behaviour
Refused: opted-out recipients (422 SAFETY_SUPPRESSED), blocked content such as shorteners or links from young numbers (422 SAFETY_CONTENT_BLOCKED), a paused number (423 SAFETY_NUMBER_PAUSED; replies to people who wrote in the last 24 h still go out). Don’t retry these unchanged.
Try it
Send this request from your browser to the Mursilat API.
documented examplePreview — this copy of the docs isn’t on mursilat.com, so the console shows the documented example instead of calling the API.
Kept only in this tab’s memory: never saved, never put in the URL, sent only to mursilat.com. Reloading the page forgets it.