Report built-in call lifecycle batch

POST https://z.u1v.ru/api/v1/calls/report-batch

Persist an authenticated batch of built-in call lifecycle reports for the active Zulip account.

Clients submit app/runtime call phases already observed locally, and the server stores or updates user-scoped call-record truth keyed by appCallId. This endpoint is best-effort for the runtime, but the stored data becomes the authenticated source for later recent-call and active-call recovery surfaces.

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/calls/report-batch \
    -u EMAIL_ADDRESS:API_KEY \
    --data-urlencode device_instance_id=device-1 \
    --data-urlencode reason=phaseChange \
    --data-urlencode 'reports=[{"appCallId": "app-call-1", "deviceInstanceId": "device-1", "phase": "connected"}]' \
    --data-urlencode created_at=2026-04-10T06:10:00Z

Parameters

device_instance_id string required

Example: "device-1"

Active device instance identifier for the reporting client.


reason string required

Example: "phaseChange"

Runtime flush reason for this batch, such as phaseChange, timer, manualFlush, or shutdown.


reports (object | object | object)[] required

Example: [{"appCallId": "app-call-1", "phase": "connected", "deviceInstanceId": "device-1"}]

Ordered lifecycle reports, delivery receipts or message delivery receipts from the client runtime.


created_at string | null optional

Example: "2026-04-10T06:10:00Z"

Optional batch creation timestamp for diagnostics.


Response

Return values

  • storedReports: integer

    Number of reports accepted into authenticated call-record persistence. Delivery receipt retries count as accepted without overwriting the first observation timestamp or artifact metadata.

  • droppedReports: integer

    Number of malformed or rejected reports dropped from the batch.

  • rejectedReports: (object)[]

    Per-report contract failures, indexed into the submitted batch. Empty when every report was accepted.

    • index: integer

      Server-authoritative index value. * reason: string

      Server-authoritative reason value. * deviceInstanceId: string

    Server-authoritative deviceInstanceId value. * reason: string

    Server-authoritative reason value. * createdAt: string | null

    Server-authoritative createdAt value.

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:

{
    "createdAt": "2026-04-10T06:10:00Z",
    "deviceInstanceId": "device-1",
    "droppedReports": 0,
    "msg": "",
    "reason": "phaseChange",
    "rejectedReports": [],
    "result": "success",
    "storedReports": 3
}