Skip to content

PushNotificationService

Chatto exposes this service below /api/connect.

Shared message and enum definitions are documented in Shared Types And Enums.

Browser Web Push subscription commands for the current user.

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/Subscribe

Request to store a PushSubscription returned by the browser Push API.

FieldTypeDescription
endpointstringPush service endpoint URL.
p256dhstringClient P-256 ECDH public key from PushSubscription.keys.p256dh.
authstringAuthentication secret from PushSubscription.keys.auth.
user_agentoptional stringOptional browser user-agent string for device identification.

Response from storing a browser push subscription.

FieldTypeDescription
subscribedboolTrue when the subscription was stored.

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/Unsubscribe

Request to remove a browser push subscription.

FieldTypeDescription
endpointstringPush service endpoint URL to remove.

Response from removing a browser push subscription.

FieldTypeDescription
unsubscribedboolTrue when the request completed.