> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/navixy-api/user-api/backend-api/resources/commons/user/session/push_token.md).

# Push token

Find information about push token usage in our [instructions](/docs/navixy-api/user-api/backend-api/guides/rules-notifications/get-push-notifications.md).

## API actions

API path: `/user/session/push_token`.

### bind

Binds Push token with a current session.

#### Parameters

| name             | description                                                                                                                                | type                                                        |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------- |
| application      | Application ID, "navixy\_iphone\_viewer" or "navixy\_android\_viewer" or "w3c\_pushapi".                                                   | [enum](/docs/navixy-api/user-api/backend-api.md#data-types) |
| token            | Push token or endpoint from pushSubscription, full URL like <https://fcm.googleapis.com/fcm/send/f6kicrBn7S0:APA91b> if your app ID is " " | string                                                      |
| parameters       | Should be used only with object with "w3c\_pushapi". Contain keys from pushSubscription {"p256dh": "...", "auth":"..."}                    | JSON object                                                 |
| category\_filter | Optional. Push notifications category filter, default is `*`.                                                                              | string                                                      |

#### Example

cURL

{% code overflow="wrap" %}

```sh
curl -X POST 'https://api.eu.navixy.com/v2/user/session/push_token/bind' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b", "application": "navixy_android_viewer", "token": "f4be7b9d04da2ce1af111b"}'
```

{% endcode %}

#### Response

```json
{
  "success": true
}
```

Using `category_filter` you can filter out unwanted notifications categories.

If `category_filter` equals to `*` this means all categories allowed.

Delimited with comma list means that allowed only listed categories i.e. `chat_message,history_rule`.

Prepended with minus and delimited with comma list means that all categories allowed except given i.e. – `history_task,history_rule`.

**Possible categories:**

* `chat_message` – notification about new chat message.
* `history_rule` – notifications related to rule actuation.
* `history_task` – notifications related to tasks.
* `history_info` – service information.
* `history_service_task` – service task notifications.
* `history_work_status` – work status notifications.

#### Errors

* [General](/docs/navixy-api/user-api/backend-api/errors.md#error-codes) types only.

### delete

Deletes push token bound with the session.

#### Parameters

Only session `hash`.

#### Examples

{% tabs %}
{% tab title="cURL" %}

```sh
curl -X POST 'https://api.eu.navixy.com/v2/user/session/push_token/delete' \
    -H 'Content-Type: application/json' \
    -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b"}'
```

{% endtab %}

{% tab title="HTTP GET" %}
{% code overflow="wrap" %}

```http
https://api.eu.navixy.com/v2/user/session/push_token/delete?hash=a6aa75587e5c59c32d347da438505fc3
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Response

```json
{
  "success": true
}
```

#### Errors

[General](/docs/navixy-api/user-api/backend-api/errors.md#error-codes) types only.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://navixy.com/docs/navixy-api/user-api/backend-api/resources/commons/user/session/push_token.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
