# Notification

## Show Alert[​](https://docs.appmachine.com/libraries/javascript/sdk/api/notification#show-alert) <a href="#show-alert" id="show-alert"></a>

Show a native alert message over the UI in the application. Returns the clicked button, by default the only button is `OK`.

```javascript
async function showDeleteMessage() {
    const buttonClicked = await showAlert('Are you sure you want to delete this?', 'This can\'t be undone', ['yes', 'no']);

    console.log(buttonClicked); // logs: 'yes'
}
```

#### Arguments[​](https://docs.appmachine.com/libraries/javascript/sdk/api/notification#arguments) <a href="#arguments" id="arguments"></a>

| name      | type              | Required | default  |
| --------- | ----------------- | -------- | -------- |
| `title`   | *`String`*        | ✅        | -        |
| `message` | *`String`*        | -        | -        |
| `buttons` | *`Array<String>`* | -        | `['ok']` |

#### Errors[​](https://docs.appmachine.com/libraries/javascript/sdk/api/notification#errors) <a href="#errors" id="errors"></a>

Here is a list of errors that can be thrown when calling this function in addition to [generic errors](/developers/javascript/sdk/core.md#generic-errors):


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appmachine.com/developers/javascript/sdk/notification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
