# Prompt for Push

In order to send browser-based push notifications to your customers, you will need to request permission to do so. This command will display a system prompt for the user to grant access. You will also need to have the CrowdPower [service-worker.js](https://app.crowdpower.io/service-worker.js) file installed in the root of your website.

```javascript
<script>
  window.cp('push');
</script>
```

{% hint style="warning" %}
Before requesting for permission to send push notifications, you **must** install the CrowdPower Service Worker in the root of your website; typically the /public directory.&#x20;

[Download Service Worker](https://app.crowdpower.io/service-worker.js)
{% endhint %}


---

# 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.crowdpower.io/getting-started/javascript-tag/prompt-for-push.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.
