Skip to content
Console
Menu

Alerts and status pages

App store purchases

Credits

Knowledge

KV

Notifications

Organizations

Storage

Workflows

API reference

Getting Started

Authentication

KV Store

Register push device on a chat profile

Registers a browser device using only the authenticated Chat session.

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

#Request

FieldTypeWhat it is
namestringAuthenticated player's profile. Required.
senderstringExisting Notify Sender in this environment. Required.
device_tokenstringExact JSON string from PushSubscription.toJSON(); never returned or logged. Required. Never returned again.

#Response

FieldTypeWhat it is
recipient_namestringActual Notify Recipient resource name. Required.
recipient_uidstringActual immutable Notify UID, distinct from the Chat principal. Required.
registration_idstringExact upstream endpoint registration identity. Required.
registration_generationstringPositive canonical decimal string returned by Notify. Required.
senderstringActual sender resource name. Required.
application_server_keystringPublic application-server key returned by Notify, never a private key. Required.

#Errors

  • PERMISSION_DENIED — The key lacks the method's permission.
  • INVALID_FIELD — A field failed validation.
  • INVALID_STATE — The Resource is in a state that forbids the call.
  • 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 describes.

#Examples

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":"…"}'