# chat.update

> Edit a message the bot posted.

Source: https://slaiky.xyz/docs/reference/methods/chat.update

`POST https://app.slaiky.xyz/api/methods/chat.update` · needs `chat:write`

## Arguments

| Argument | Type | Required | What |
| --- | --- | --- | --- |
| `messageId` | id | yes | Message id. |
| `text` | string | no | Up to 40,000 characters. |
| `blocks` | [blocks](/docs/reference/blocks) | no | Layout blocks from the closed catalog (header, section, context, actions with buttons and selects, divider, image). Up to 50 items, may be `null`. |

## Answer

`{ "ok": true, … }` with: message: Message. A refusal is `{ "ok": false, "error": { "code", "message" } }` ([errors](/docs/errors)).

## Example

The required arguments, with placeholders in angle brackets.

*you run*

```sh

curl -s https://app.slaiky.xyz/api/methods/chat.update \
  -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"messageId":"<messageId>"}'

```
