# Add a reaction

> Adds the app's own reaction. Adding the same one twice changes nothing.

**POST** `/api/public/apps/v1/reactions`

Needs the `reactions:write` permission.

Adds the app's own reaction. Adding the same one twice changes nothing.

## Body

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `message_id` | uuid | yes |  |
| `emoji` | string | yes | Up to 34 characters. |

## Example

**curl**

```sh
curl -X POST "https://amedeus.app/api/public/apps/v1/reactions" \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"message_id":"52f4c823-8e7f-4349-bb98-1ac8683aad13","emoji":"…"}'
```

**JavaScript**

```js
const response = await fetch("https://amedeus.app/api/public/apps/v1/reactions", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({"message_id":"52f4c823-8e7f-4349-bb98-1ac8683aad13","emoji":"…"}),
});
const result = await response.json(); // { ok: true, … } or { ok: false, error, message }
```

**Python**

```python

request = urllib.request.Request(
    "https://amedeus.app/api/public/apps/v1/reactions",
    data=json.dumps({"message_id":"52f4c823-8e7f-4349-bb98-1ac8683aad13","emoji":"…"}).encode(),
    headers={
        "Authorization": f"Bearer {os.environ['TOKEN']}",
        "Content-Type": "application/json",
        "User-Agent": "my-app/1.0",
    },
    method="POST",
)
with urllib.request.urlopen(request) as response:
    result = json.load(response)  # a 4xx or 5xx raises urllib.error.HTTPError
```

## Response

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `ok` | `true` | yes |  |

```json
{
  "ok": true
}
```

## Errors

Failures answer `{ "ok": false, "error": "<code>", "message": "…" }`; see [Errors](/reference/errors/).

- `401`: The token is missing, wrong or revoked.
- `403`: A missing scope (the message names it), or a channel the app isn't in.
- `404`: The message or channel doesn't exist.
- `429`: Slow down; `Retry-After` says for how many seconds.

