# views.update

> Change an open modal (or a Home).

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

With `hash`, refused when it changed since.

`POST https://app.slaiky.xyz/api/methods/views.update` · needs the bot token

## Arguments

| Argument | Type | Required | What |
| --- | --- | --- | --- |
| `viewId` | id | yes |  |
| `view` | [view](/docs/reference/blocks#views) | yes |  |
| `hash` | string | no | Up to 64 characters. |

## Answer

`{ "ok": true, … }` with: view: View. 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/views.update \
  -H "authorization: Bearer $SLAIKY_BOT_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"viewId":"<viewId>","view":{}}'

```
