PushNotificationService
Chatto exposes this service below /api/connect.
Shared message and enum definitions are documented in Shared Types And Enums.
PushNotificationService
Section titled “PushNotificationService”Browser Web Push subscription commands for the current user.
Subscribe
Section titled “Subscribe”Stores or updates the caller’s browser push subscription.
The server must have Web Push configured. Clients normally call this after the browser grants notification permission and returns a PushSubscription.
POST /api/connect/chatto.api.v1.PushNotificationService/SubscribeInput: SubscribePushRequest
Section titled “Input: SubscribePushRequest”Request to store a PushSubscription returned by the browser Push API.
| Field | Type | Description |
|---|---|---|
endpoint | string | Push service endpoint URL. |
p256dh | string | Client P-256 ECDH public key from PushSubscription.keys.p256dh. |
auth | string | Authentication secret from PushSubscription.keys.auth. |
user_agent | optional string | Optional browser user-agent string for device identification. |
Result: SubscribePushResponse
Section titled “Result: SubscribePushResponse”Response from storing a browser push subscription.
| Field | Type | Description |
|---|---|---|
subscribed | bool | True when the subscription was stored. |
Unsubscribe
Section titled “Unsubscribe”Removes the caller’s browser push subscription by endpoint.
The call is idempotent: removing an unknown endpoint still succeeds.
POST /api/connect/chatto.api.v1.PushNotificationService/UnsubscribeInput: UnsubscribePushRequest
Section titled “Input: UnsubscribePushRequest”Request to remove a browser push subscription.
| Field | Type | Description |
|---|---|---|
endpoint | string | Push service endpoint URL to remove. |
Result: UnsubscribePushResponse
Section titled “Result: UnsubscribePushResponse”Response from removing a browser push subscription.
| Field | Type | Description |
|---|---|---|
unsubscribed | bool | True when the request completed. |