Preflight a built-in direct call

POST https://z.u1v.ru/api/v1/calls/preflight

Validate call intent and reachability without creating a call session.

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/preflight \
    -u EMAIL_ADDRESS:API_KEY \
    --data-urlencode caller_user_id=42 \
    --data-urlencode 'intent={"kind": "user", "mediaType": "audio", "userId": "43"}' \
    --data-urlencode device_instance_id=device-1 \
    --data-urlencode tenant_id=realm-1 \
    --data-urlencode idempotency_key=preflight-1 \
    --data-urlencode replace_session_id=session-1 \
    --data-urlencode preferred_route_mode=direct \
    --data-urlencode 'metadata={"surface": "chat"}'

Parameters

caller_user_id string required

Example: "42"

Authenticated Zulip caller identifier.


intent object required

Example: {"kind": "user", "userId": "43", "mediaType": "audio"}

Structured direct-call target and media intent.


device_instance_id string | null optional

Example: "device-1"

Optional originating application device identifier.


tenant_id string | null optional

Example: "realm-1"

Optional call-control tenant identifier.


idempotency_key string | null optional

Example: "preflight-1"

Optional client-generated idempotency key.


replace_session_id string | null optional

Example: "session-1"

Optional call session that this request replaces.


preferred_route_mode string | null optional

Example: "direct"

Optional preferred call routing mode.


metadata object | null optional

Example: {"surface": "chat"}

Optional app-owned call metadata.


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"
}