Register mobile push routes

POST https://z.u1v.ru/api/v1/mobile_push/routes/register

Replace the authenticated user's push routes for one application device. Provider credentials are stored server-side and never echoed.

Usage examples

The -u line implements HTTP Basic authentication. See the Authorization header documentation for how to get those credentials for Zulip users and bots.

curl -sSX POST https://z.u1v.ru/api/v1/mobile_push/routes/register \
    -u EMAIL_ADDRESS:API_KEY \
    --data-urlencode device_instance_id=device-1 \
    --data-urlencode 'push_routes=[{"provider": "fcm", "token": "provider-token"}]' \
    --data-urlencode app_brand_id=universalchat \
    --data-urlencode app_package_id=com.example.universalchat \
    --data-urlencode app_version=30.0.271+271 \
    --data-urlencode build_channel=release \
    --data-urlencode signing_certificate_id=728F2719121F681280A624A79C12DCEC870051791318FF5EFEE11D4389D2BE75 \
    --data-urlencode platform=android \
    --data-urlencode os_major=16 \
    --data-urlencode manufacturer=Google \
    --data-urlencode 'device_model=Pixel 9' \
    --data-urlencode 'device_alias=Work phone' \
    --data-urlencode server_id=zulip-prod-1 \
    --data-urlencode realm_id=42 \
    --data-urlencode realm_url=https://chat.example.com \
    --data-urlencode account_user_id=42 \
    --data-urlencode environment=production \
    --data-urlencode device_id=1144 \
    --data-urlencode push_key_id=42 \
    --data-urlencode push_key=MY+paNlyduYJRQFNZva8w7Gv3PkBua9kIj581F9Vr301

Parameters

device_instance_id string required

Example: "device-1"

Stable installation identifier generated by the client. The server binds this value to the authenticated account before using it for provider-route deduplication.


push_routes (object)[] required

Example: [{"provider": "fcm", "token": "provider-token"}]

Provider route descriptors supported by this device.


app_brand_id string | null optional

Example: "universalchat"

White-label application brand identifier.


app_package_id string | null optional

Example: "com.example.universalchat"

Platform package or bundle identifier.


app_version string | null optional

Example: "30.0.271+271"

Client application version.


build_channel string | null optional

Example: "release"

Client release channel.


signing_certificate_id string | null optional

Example: "728F2719121F681280A624A79C12DCEC870051791318FF5EFEE11D4389D2BE75"

Public build identity used to bind the route to the configured application brand. Android sends the uppercase SHA-256 signing-certificate fingerprint; Apple platforms send the ten-character Team ID.


platform string | null optional

Example: "android"

Client platform used for application-brand validation.


os_major string | null optional

Example: "16"

Operating-system major version for user-facing diagnostics.


manufacturer string | null optional

Example: "Google"

Device manufacturer for user-facing diagnostics.


device_model string | null optional

Example: "Pixel 9"

Public device model for user-facing diagnostics.


device_alias string | null optional

Example: "Work phone"

Optional name explicitly assigned by the user.


server_id string | null optional

Example: "zulip-prod-1"

Logical server identifier.


realm_id string | null optional

Example: "42"

Organization identifier.


realm_url string | null optional

Example: "https://chat.example.com"

Canonical organization URL.


account_user_id string | null optional

Example: "42"

Client-side account user identifier.


environment string | null optional

Example: "production"

Client deployment environment.


device_id integer | null optional

Example: 1144

Server-owned device ID for an E2EE provider route. The device must belong to the authenticated user.


push_key_id integer | null optional

Example: 42

Version identifier for the device E2EE push key.


push_key string | null optional

Example: "MY+paNlyduYJRQFNZva8w7Gv3PkBua9kIj581F9Vr301"

Base64-encoded E2EE push key bound to the device.


Response

Example response(s)

Successful response from a UCS extension endpoint. Endpoint-specific fields are returned alongside the standard Zulip success envelope.

{
    "msg": "",
    "result": "success"
}