Create Push Subscription
Description
Section titled “Description”wss push_subscription_create
The push_subscription_create
request registers devices for receiving push notifications.
Request Parameters
Section titled “Request Parameters”Name | Type | Description |
---|---|---|
platform | string | Device platform (web , ios , etc.) |
web_endpoint | string | Web Push endpoint URL |
web_key_auth | string | Web Push authentication key |
web_key_p256dh | string | Web Push P256DH public key |
device_token | string | Device token |
device_udid | string | Current device id |
The [web_endpoint
, web_key_auth
, web_key_p256dh
] and device_token
fields are interchangeable for different devices.
Response Fields
Section titled “Response Fields”Name | Type | Description |
---|---|---|
platform | string | Device platform (web , ios , etc.) |
web_endpoint | string | Web Push endpoint URL |
web_key_auth | string | Web Push authentication key |
web_key_p256dh | string | Web Push P256DH public key |
device_token | string | Device token |
device_udid | string | Current device id |
Example
Section titled “Example”{ "request": { "push_subscription_create": { "platform": "web", "web_endpoint": "enpoint", "web_key_auth": "auth", "web_key_p256dh": "p256dh", "device_token": "...", "device_udid": "deviceId" }, "id": "RequestId", },};
{ "response": { "id": "RequestId", "subscription": { "_id": "644156fea451b5950d13d0e8", "platform": "web", "web_endpoint": "enpoint", "web_key_auth": "auth", "web_key_p256dh": "p256dh", "device_udid": "deviceId", "user_id": "644156fea451b5950d13d0e5", "created_at": "2025-08-13T05:51:44.733Z", "updated_at": "2025-08-13T05:51:44.733Z" } }}