---
# @generated by sylphx-gen. Do not edit.
title: "Register push device on a chat profile"
description: "`events.chat_profiles.register_push_device` (POST /v1/{name}:registerPushDevice): Registers a browser device using only the authenticated Chat session."
type: reference
product: queues
summary: "Registers a browser device using only the authenticated Chat session."
updated: 2026-09-28
nav: false
---

Registers a browser device using only the authenticated Chat session.

- **Path** `POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/chat_profiles/chat-profile:registerPushDevice`
- **Scope** `events:write`
- **Effect** `write` — a successful call changes state.
- **Collection** [chat_profiles](/docs/api/chat_profiles)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | Authenticated player's profile. Required. |
| `sender` | `string` | Existing Notify Sender in this environment. Required. |
| `device_token` | `string` | Exact JSON string from PushSubscription.toJSON(); never returned or logged. Required. Never returned again. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `recipient_name` | `string` | Actual Notify Recipient resource name. Required. |
| `recipient_uid` | `string` | Actual immutable Notify UID, distinct from the Chat principal. Required. |
| `registration_id` | `string` | Exact upstream endpoint registration identity. Required. |
| `registration_generation` | `string` | Positive canonical decimal string returned by Notify. Required. |
| `sender` | `string` | Actual sender resource name. Required. |
| `application_server_key` | `string` | Public application-server key returned by Notify, never a private key. Required. |

## Errors

- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.
- [`INVALID_STATE`](/docs/api/errors/INVALID_STATE) — The Resource is in a state that forbids the call.
- [`UNAVAILABLE`](/docs/api/errors/UNAVAILABLE) — The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/chat_profiles/chat-profile:registerPushDevice" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"device_token":"…","sender":"…"}'
```

**TypeScript**

```ts
const response = await sylphx.events.chatProfiles.registerPushDevice({ deviceToken: '…', name: 'orgs/acme/projects/shop/envs/production/chat_profiles/chat-profile', sender: '…' })
```

**Rust**

```rust
let mut req = sylphx::events::RegisterChatPushDeviceRequest::default();
req.device_token = "…".to_string();
req.name = "orgs/acme/projects/shop/envs/production/chat_profiles/chat-profile".to_string();
req.sender = "…".to_string();
let response = sx.events().chat_profiles().register_push_device(req).await?;
```

**CLI**

```bash
sylphx events chat-profiles register-push-device orgs/acme/projects/shop/envs/production/chat_profiles/chat-profile
```

**MCP**

```json
{ "method_id": "events.chat_profiles.register_push_device", "args": {"device_token":"…","name":"orgs/acme/projects/shop/envs/production/chat_profiles/chat-profile","sender":"…"} }
```
