> 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/resources/commons/user/session/push_token.md).

# Push token

Bind a device's push notification token to the current session, and filter what it receives.

A push token identifies one installation of a mobile application to its push service. Binding it to the current session is what lets the Navixy platform deliver notifications to that device.

A binding belongs to the session, so signing out and back in means binding again. For a walkthrough, see [how to receive push notifications in your app](/docs/navixy-api/user-api/guides/rules-notifications/get-push-notifications.md).

## Category filter

`category_filter` decides which notification categories reach the device:

* `*` allows every category.
* A comma-separated list allows only the categories named, for example `chat_message,history_rule`.
* A comma-separated list prefixed with a minus allows every category except those named, for example `-history_task,history_rule`.

The categories are:

* `chat_message` - a new chat message.
* `history_rule` - a rule firing.
* `history_task` - anything about a task.
* `history_info` - service information.
* `history_service_task` - a service task.
* `history_work_status` - a working status change.

## API actions

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

Operations that list no errors of their own return only the [general error codes](/docs/navixy-api/general/errors.md#error-codes).

***

## Bind push token

> Associate a push notification token with the current session, so the platform can deliver push notifications to that device.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Users","description":"Operations for authenticating a user, managing their sessions, reading and updating their settings and personal information, reading audit records, and registering custom applications. All resources under the /user/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/user/session/push_token/bind":{"post":{"tags":["Users"],"summary":"Bind push token","description":"Associate a push notification token with the current session, so the platform can deliver push notifications to that device.","operationId":"userSessionPushTokenBind","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"application":{"type":"string","description":"Application the token belongs to.","enum":["navixy_iphone_viewer","navixy_android_viewer","w3c_pushapi"]},"token":{"type":"string","description":"Push token, or the endpoint from `pushSubscription` as a full URL when the application is `w3c_pushapi`."},"parameters":{"type":"object","description":"Only for `w3c_pushapi`. Carries the keys from `pushSubscription`, `p256dh` and `auth`.","additionalProperties":true},"category_filter":{"type":"string","description":"Optional. Which notification categories to deliver. Defaults to `*`, meaning all. A comma-separated list allows only those categories; the same list prefixed with a minus allows all except those."}},"required":["application","token"]}}}},"responses":{"200":{"description":"Token bound","$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

***

## Delete push token

> Remove the push notification token associated with the current session.\
> \
> Takes no parameters. Returns error code 201, not found in database, when the session has no token bound.\
> \
> Also accepts GET with the same parameters as query-string values.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Users","description":"Operations for authenticating a user, managing their sessions, reading and updating their settings and personal information, reading audit records, and registering custom applications. All resources under the /user/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/user/session/push_token/delete":{"post":{"tags":["Users"],"summary":"Delete push token","description":"Remove the push notification token associated with the current session.\n\nTakes no parameters. Returns error code 201, not found in database, when the session has no token bound.\n\nAlso accepts GET with the same parameters as query-string values.","operationId":"userSessionPushTokenDelete","responses":{"200":{"description":"Token deleted","$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 201 - Not found in the database, when the session has no token bound.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
