Register E2EE push device to bouncer

POST https://push.zulipchat.com/api/v1/remotes/push/e2ee/register

Register a push device to bouncer to receive end-to-end encrypted mobile push notifications.

Self-hosted servers use this endpoint to asynchronously register a push device to the bouncer server after receiving a request from the mobile client to register E2EE push device.

It is not meant to be used by mobile clients directly.

Changes: New in Zulip 11.0 (feature level 406).

Usage examples

curl -sSX POST https://push.zulipchat.com/api/v1/remotes/push/e2ee/register \
    -u ZULIP_ORG_ID:ZULIP_ORG_KEY \
    --data-urlencode realm_uuid=realm-uuid \
    --data-urlencode push_account_id=2408 \
    --data-urlencode encrypted_push_registration=encrypted-push-registration-data \
    --data-urlencode bouncer_public_key=bouncer-public-key

Parameters

realm_uuid string required

Example: "realm-uuid"

The UUID of the realm to which the push device being registered belongs.


push_account_id integer required

Example: 2408

The push_account_id value provided by the mobile client to register E2EE push device.


encrypted_push_registration string required

Example: "encrypted-push-registration-data"

The encrypted_push_registration value provided by the mobile client to register E2EE push device.


bouncer_public_key string required

Example: "bouncer-public-key"

The bouncer_public_key value provided by the mobile client to register E2EE push device.


Response

Return values

  • device_id: integer

    Unique identifier assigned by the bouncer for the registration.

Example response(s)

Changes: As of Zulip 7.0 (feature level 167), if any parameters sent in the request are not supported by this endpoint, a successful JSON response will include an ignored_parameters_unsupported array.

A typical successful JSON response may look like:

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

An example JSON response for when the given bouncer_public_key is invalid:

{
    "code": "INVALID_BOUNCER_PUBLIC_KEY",
    "msg": "Invalid bouncer_public_key",
    "result": "error"
}

An example JSON response for when the given encrypted_push_registration is stale:

{
    "code": "REQUEST_EXPIRED",
    "msg": "Request expired",
    "result": "error"
}

An example JSON response for when either the bouncer fails to decrypt the given encrypted_push_registration or the decrypted data is invalid:

{
    "code": "BAD_REQUEST",
    "msg": "Invalid encrypted_push_registration",
    "result": "error"
}

An example JSON response for when no realm is registered for the authenticated server on the bouncer for the given realm_uuid:

{
    "code": "MISSING_REMOTE_REALM",
    "msg": "Organization not registered",
    "result": "error"
}